Java Sol || Easy || Binary Search || Simple
Code\n\nclass Solution {\n    public int maximumCandies(int[] candies, long k) {\n        int low = 1;\n        int high = Arrays.stream(candies).max().getAsInt
# Code\n```\nclass Solution {\n    public int maximumCandies(int[] candies, long k) {\n        int low = 1;\n        int high = Arrays.stream(candies).max().getAsInt();\n        int ans = 0;\n        while (low<=high) {\n            int mid = low + (high-low)/2;\n            long currAns = 0;\n            for (int i : candies) {\n                currAns += i/mid;\n            }\n            if (currAns >= k) {\n                low = mid+1;\n                ans = Math.max(ans, mid);\n            }\n            else {\n                high = mid-1;\n            }\n        }\n        return ans;\n    }\n}\n```
['Java']