Question regarding the size of the remaining combinations:
In the book we have numRemaining<= n-i+1.
Why +1?!
(Java) Problem 16.5
daemoohn
#1
0 Likes
Hey @daemoohn,
It is just early termination. We are counting the number of remaining elements are enough for the rest of recursive computation. You might want to use a small example to test that.
0 Likes