[LC] Add solution to jump game 2.