jumpgame and validate palindrome