Can you please do a dry run of this code and share it. i get all confused when recursion is in a loop. This would help me understand .
code ->https://www.geeksforgeeks.org/backtracking-to-find-all-subsets/
Can you please do a dry run of this code and share it. i get all confused when recursion is in a loop. This would help me understand .
code ->https://www.geeksforgeeks.org/backtracking-to-find-all-subsets/
hello @mikkyimran
the tree will build so,something like this.
reason is simple.there either include ith index or exculding ith index .
also i would suggest to check recursion playlist these subset generation techniques are covered there.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.