[Python 3] Binary search with simple check
\n\n# Complexity\n- Time complexity: O(Nlog(N))\n Add your time complexity here, e.g. O(n) \n\n\n- Space complexity: O(1)\n Add your space complexity here, e.g.
\n\n# Complexity\n- Time complexity: O(Nlog(N))\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def minCapability(self, nums: List[int], k: int) -> int:\n        def check(cap):\n            count=taken=0\n            for x in nums:\n                if taken:\n                    taken=False\n                elif x<=cap:\n                    count+=1\n                    taken=True\n            return count>=k\n        l,r=min(nums),max(nums)\n        while l<=r:\n            mid=l+(r-l)//2\n            if check(mid):\n                res=mid\n                r=mid-1\n            else:\n                l=mid+1\n        return res       \n```\n\nAnother Problem that does not strike as binary search-https://leetcode.com/problems/kth-smallest-number-in-multiplication-table/\n
['Python3']