At first I didnt understand those exponents, why for example for nums = [2, 3, 4, 4, 6 ,7] and target =12 you add 32 to the count at first iteration but now I understand that point is that since 2+7 is less than 12, you take number of all possible subsequences of [3, 4, 4, 6 ,7] (including the empty set) and then you add elemnt "2" to each of them, which makes the empty set now equal to [2], and you are guarenteed that each of the subsequences has the smallest elemnt of 2 and biggest at most 7 (there is 32 of them) really helpfull video, thank you,
I am missing something, would anyone explain... Did you count the '8', the last element from the explained example? after decreasing the right pointer ... We need to count it as one subsequence of sum
At first I didnt understand those exponents, why for example for nums = [2, 3, 4, 4, 6 ,7] and target =12 you add 32 to the count at first iteration
but now I understand that point is that since 2+7 is less than 12, you take number of all possible subsequences of [3, 4, 4, 6 ,7] (including the empty set) and then you add elemnt "2" to each of them, which makes the empty set now equal to [2], and you are guarenteed that each of the subsequences has the smallest elemnt of 2 and biggest at most 7 (there is 32 of them)
really helpfull video, thank you,
no.. empty set is not accepted.
thank you very much!! Bhaiya.
Really great explanation!! Thank you
Liked the precomputation part and loved the explanation. Small, short and crisp
Thankyou
Saved my interview! Thanks man!
best explanation available on yt
Very beautifully explained sir !!
really like the explanation on the permutation part, good job!
Thank you! I'm glad this helped! Be sure to subscribe for more content :D
Thank you
Solid ans superb explanation!
I am missing something, would anyone explain...
Did you count the '8', the last element from the explained example? after decreasing the right pointer ...
We need to count it as one subsequence of sum
bro, min element is 8 and the max element is 8, 8+8 is greater than 10, and we dont take it.