a simpler solution for jump game.