C++ || Binary Search
\n  bool is_possible(vector<int>& candies, int mid, long long k)\n    {\n        long long count = 0;\n        \n        for(int i = 0; i < candies.size(); i++)
```\n  bool is_possible(vector<int>& candies, int mid, long long k)\n    {\n        long long count = 0;\n        \n        for(int i = 0; i < candies.size(); i++)\n        {\n            count += candies[i] / mid;\n        }\n        \n        if(count >= k)\n            return true;\n        \n        return false;\n    }\n    \n    int maximumCandies(vector<int>& candies, long long k) {\n        \n        int n = candies.size();\n        \n        int low = 1;\n        \n        int high = *max_element(candies.begin(), candies.end());\n        \n        int ans = 0;\n        \n        while(low <= high)\n        {\n            int mid = low + (high - low) / 2;\n            \n            if(is_possible(candies, mid, k))\n            {\n                ans = mid;\n                \n                low = mid + 1;\n            }\n            else\n            {\n                high = mid - 1;\n            }\n        }\n        \n        return ans;\n    }\n    \n    \n```
['C', 'Binary Tree', 'C++']