🔥 Beats 100% Runtime
Intuition\nIn summary, the algorithm efficiently narrows down the minimum capability required using binary search and verifies feasibility in linear time.\n\n# 
# Intuition\nIn summary, the algorithm efficiently narrows down the minimum capability required using binary search and verifies feasibility in linear time.\n\n# Approach\nThis approach ensures that you efficiently find the minimum capability with a time complexity of O(n log(max_value - min_value)), where n is the length of the nums array.\n\n# Complexity\n- Time complexity:\nBinary Search: O(log(max_value - min_value))\nFeasibility Check: O(n)\nOverall: O(n log(max_value - min_value))\n\n- Space complexity:\nAuxiliary Space: O(1)\n\n# Code\n```typescript []\nfunction minCapability(nums: number[], k: number): number {\n    let low = Math.min(...nums); // The smallest possible value for capability\n    let high = Math.max(...nums); // The largest possible value for capability\n\n    const canRobWithCapability = (capability: number): boolean => {\n        let count = 0;\n        for (let i = 0; i < nums.length; i++) {\n            if (nums[i] <= capability) {\n                count++;\n                i++; // Skip the next house\n            }\n        }\n        return count >= k;\n    };\n\n    while (low < high) {\n        const mid = Math.floor((low + high) / 2);\n        if (canRobWithCapability(mid)) {\n            high = mid; // Try for a smaller capability\n        } else {\n            low = mid + 1; // Increase capability\n        }\n    }\n\n    return low;\n}\n\n\n\n```
['TypeScript']