snakes and ladders, hackerrank style
palindrome question