Beats 100% in java hindi me asaan approach
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n# Code\n```\nclass Solution {\n    public int minPatches(int[] nums, int n) {\n        long missing = 1; // Wo smallest number jo humein banana hai\n        int patches = 0, i = 0; // patches count aur index i\n\n        while (missing <= n) { // Jab tak missing n se chhota ya barabar hai\n            if (i < nums.length && nums[i] <= missing) { \n                // Agar current number missing se chhota ya barabar hai\n                missing += nums[i++]; // Us number ko missing mein add karo aur index badhao\n            } else {\n                // Agar current number missing se bada hai ya array khatam ho gaya hai\n                missing += missing; // missing ko add karo (double kar do)\n                patches++; // patches count increment karo\n            }\n        }\n        return patches; // Minimum patches return karo\n    }\n}\n\n```
['Array', 'Java']