One line | Python | Binary Search
Approach\nNothing special. Posting here to share a simple one-liner using bisect.\n\n# Code\npython3\nclass Solution:\n    def maximumCandies(self, candies: Lis
# Approach\nNothing special. Posting here to share a simple one-liner using `bisect`.\n\n# Code\n```python3\nclass Solution:\n    def maximumCandies(self, candies: List[int], k: int) -> int:\n        return bisect_left(range(1, sum(candies) // k + 1), True, key=lambda c: sum(x // c for x in candies) < k)\n```
['Binary Search', 'Python3']