Easy Understandable JAVA ACCEPTED
\nclass Solution {\n    public static int maximumCandies(int[] arr, long k) {\n\t\tArrays.sort(arr);\n\t\tint low = 1;\n\t\tint right = arr[arr.length - 1];\n\t
```\nclass Solution {\n    public static int maximumCandies(int[] arr, long k) {\n\t\tArrays.sort(arr);\n\t\tint low = 1;\n\t\tint right = arr[arr.length - 1];\n\t\twhile (low <= right) {\n\t\t\tint mid = (right - low) / 2 + low;\n\t\t\tif (helper(arr, k, mid)) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn right;\n\t}\n\n\tpublic static boolean helper(int[] arr, long k, int mid) {\n\t\tlong curr = 0;\n\t\tfor (int i = arr.length - 1; i >= 0 && curr < k; i--) {\n\t\t\tcurr += arr[i] / mid;\n\t\t}\n\t\treturn curr >= k;\n\t}\n}\n```
['Binary Search', 'Java']