Binary Search
It could be tricky to see why a binary search works here.\n\nIf we want to steal no more than m money from each house, we can greedily count the maximum number 
It could be tricky to see why a binary search works here.\n\nIf we want to steal no more than `m` money from each house, we can greedily count the maximum number of houses that we can steal from.\n\nThis is because it\'s always better to steal from the house if we can, than to skip it. \n> In other words, If we can steal from either `nums[i]` and `nums[i + 1]`, stealing from `nums[i]` allows us to also potentially steal from `nums[i + 2]`.\n\nAfter we steal from the house, we skip the next one.\n\nWe can use a binary search to find the minimum capability when stealing from `k` houses.\n\n**C++**\n```cpp\nint minCapability(vector<int>& nums, int k) {\n    int l = 1, r = 1000000000;\n    while (l < r) {\n        int m = (l + r) / 2, take = 0;\n        for (int i = 0; i < nums.size() && take < k; ++i) {\n            take += nums[i] <= m;\n            i += nums[i] <= m;\n        }\n        if (take < k)\n            l = m + 1;\n        else\n            r = m;\n    }\n    return l;\n}\n```
['C']