Quantcast
Channel: January 2015 – Program Creek
Viewing all articles
Browse latest Browse all 6

LeetCode – Patching Array (Java)

$
0
0
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. Example 1: nums = [1, 3], n = 6 Return 1. ... Read more

Viewing all articles
Browse latest Browse all 6

Trending Articles