Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be formed by the sum of some elements in the array. Return the minimum number of patches required.

This is a Leetcode problem.

Patching Array. Read the full post (406 words, estimated 1:37 mins reading time)