backtrack
that takes the current index and the current subsequence as arguments.backtrack
recursively with the next index and the updated subsequence.backtrack
with the next index and the current subsequence to explore the possibility of not including the current element.