hackerrank snakes and ladder-compilation pass