could not understand the working of the loop in this ques.
Explanation needed for loop working
The loop is just to iterate over all the possible values of the thrown dice at any particular moment of the game. Since you need to report all the possible cases to reach the target value from a particular state, you need to consider all the values of the dice that could occur in that state.
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.