Simple java solution using binary search
\tclass Solution {\n    public List findClosestElements(int[] arr, int k, int x) {\n        List result = new ArrayList<>();\n        \n        int low = 0, hig
\tclass Solution {\n    public List<Integer> findClosestElements(int[] arr, int k, int x) {\n        List<Integer> result = new ArrayList<>();\n        \n        int low = 0, high = arr.length -1;\n        \n        while(high - low  >= k){\n            if(Math.abs(arr[low] - x) > Math.abs(arr[high] - x))\n                low++;\n            else\n                high--;\n        }\n        \n        for(int i = low; i <= high; i++)\n            result.add(arr[i]);\n        \n        \n        return result;\n    }\n\t}
['Binary Tree', 'Java']