Snake ladder problem GFG

https://practice.geeksforgeeks.org/problems/snake-and-ladder-problem/0

it give compiler error why?

the iterator definition is wrong
simply use auto iterator instead of defining the iterator
image

i update the code but some test case not passed

refer to the video
and check if u can find ur mistake

it will help u more
in case u fail to do so ping back again
first try by urself

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.