give sort integer array arr integers k x return k close integer x array the result sort ascend orderan integer close x integer b ifa x b x ora x b x b Example 1input arr 12345 k 4 x 3output 1234example 2input arr 12345 k 4 x 1Output 1234 Constraints1 k arrlength1 arrlength 104arr sort ascend order104 arri x 104