| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/pythonpeixun/LeetCode-Solutions/master/C++/patching-array.cpp | [Back] [Original] |
// Time: O(s + logn), s is the number of elements in the array
// Space: O(1)
class Solution {
public:
int minPatches(vector& nums, int n) {
int patch = 0;
for (uint64_t miss = 1, i = 0; miss
| Web Proxy Viewer | New URL | Original Page |