give sort integer array nums integer n addpatch element array number range 1 n inclusive form sum element arrayreturn minimum number patch require Example 1input num 13 n 6output 1explanationcombinations num 1 3 13 form possible sum 1 3 4now addpatch 2 num combination 1 2 3 13 23 123Possible sum 1 2 3 4 5 6 cover range 1 6so need 1 patchExample 2input num 1510 n 20output 2explanation the patch 2 4example 3input num 122 n 5output 0 Constraints1 numslength 10001 numsi 104nums sort ascend order1 n 231 1