https://leetcode.com/problems/frog-jump/// 受以下网页启发,用递归可行// https://discuss.leetcode.com/topic/59337/easy-version-javapublic class Solution { Map mp; private int[] stones; public boolean canCross(int[] s) { stones = s; if (stones[1] != 1) { return false; } if (stones.length < 3) { return true; } mp = new HashMap(); Set st = new HashSet(); st.add(1); mp.put(1, st); for (int i=2; i= step - 1 && dist <= step + 1) { if (impl(i, dist)) { return true; } } } return false; }}*/