Easy to understand binary search method, beats 98%
\'\'\'\n\n\n\tpublic List findClosestElements(int[] arr, int k, int x) {\n        List res = new ArrayList<>();\n        int start = 0;\n        int end = arr.l
\'\'\'\n\n\n\tpublic List<Integer> findClosestElements(int[] arr, int k, int x) {\n        List<Integer> res = new ArrayList<>();\n        int start = 0;\n        int end = arr.length - k - 1;\n        while (start <= end) {\n            int mid = (end - start) / 2 + start;\n            if ((x - arr[mid]) > (arr[mid + k] -x)) {\n                start = mid + 1;\n            } else {\n                end = mid - 1;                \n            }\n        }\n        for (int i = start; i < start + k; i++) {\n            res.add(arr[i]);\n        }\n        return res;\n    }\n\t\n\t\n\t\'\'\'
['Sliding Window', 'Binary Tree']