(Java) Problem 16.5

#1

Question regarding the size of the remaining combinations:
In the book we have numRemaining<= n-i+1.
Why +1?!

0 Likes

#2

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