100% faster ||  easy to understand solution
\n bool ispossible(vector<int>& nums, int mid, int k){\n          int i = 0, n = nums.size();\n        while (i < n) {\n            if (nums[i] <= mid) {\n     
```\n bool ispossible(vector<int>& nums, int mid, int k){\n          int i = 0, n = nums.size();\n        while (i < n) {\n            if (nums[i] <= mid) {\n                k--;\n                i+=2;\n            }\n            else {\n                i++;\n            }\n            if (k == 0) {\n                return true;\n            }\n        }\n        return k == 0;\n    }\n        \n   int minCapability(vector<int>& nums, int k) {\n        int st=INT_MAX;\n        \n        int end=INT_MIN;\n        for(int i=0; i<nums.size(); i++){\n            end = max(end, nums[i]);\n            st = min(st, nums[i]);\n        }\n        \n        int ans = INT_MAX;\n        while(st<=end){\n            int mid=st+(end-st)/2;\n            if(ispossible(nums,mid,k)){\n                ans = min(ans, mid);\n                end = mid-1;\n            }\n            else{\n                st = mid+1;\n            }\n         }\n         return ans;\n   }\n```
['Binary Tree']