Snake ladders doubt


sir my 1 testcase is failing please help
second one is working fine