comefrom: <awangdev>Frog Jump_2.java
code: public boolean canCross(int[] stones) {
          if (stones == null || stones.length == 0) return false;
          int n = stones.length;
          Map<Integer, Set<Integer>> dp = new HashMap<>();
          for (int stone : stones) {
              dp.put(stone, new HashSet<>());
          }
          dp.get(0).add(0);
          for (int stone : stones) {
              for (int k : dp.get(stone)) {
                  if (k - 1 > 0 && dp.containsKey(stone + k - 1)) { 
                      dp.get(stone + k - 1).add(k - 1);
                  }
                  if (k > 0 && dp.containsKey(stone + k)) {
                      dp.get(stone + k).add(k);
                  }
                  if (k + 1 > 0 && dp.containsKey(stone + k + 1)) { 
                      dp.get(stone + k + 1).add(k + 1);
                  }
              }
          }
          int lastStone = stones[n - 1];
          return !dp.get(lastStone).isEmpty(); 
      }
masked: public boolean var_0 ( int [ ] var_1 ) {
    if ( var_1 == null || var_1 . length == 0 ) return false ;
    int var_5 = var_1 . length ;
    Map < Integer , Set < Integer >> var_10 = new HashMap < > ( ) ;
    for ( int var_11 : var_1 ) {
      var_10 . put ( var_11 , new HashSet < > ( ) ) ;
    }
    var_10 . get ( 0 ) . add ( 0 ) ;
    for ( int var_11 : var_1 ) {
      for ( int var_16 : var_10 . get ( var_11 ) ) {
        if ( var_16 - 1 > 0 && var_10 . containsKey ( var_11 + var_16 - 1 ) ) {
          var_10 . get ( var_11 + var_16 - 1 ) . add ( var_16 - 1 ) ;
        }
        if ( var_16 > 0 && var_10 . containsKey ( var_11 + var_16 ) ) {
          var_10 . get ( var_11 + var_16 ) . add ( var_16 ) ;
        }
        if ( var_16 + 1 > 0 && var_10 . containsKey ( var_11 + var_16 + 1 ) ) {
          var_10 . get ( var_11 + var_16 + 1 ) . add ( var_16 + 1 ) ;
        }
      }
    }
    int var_19 = var_1 [ var_5 - 1 ] ;
    return ! var_10 . get ( var_19 ) . isEmpty ( ) ;
  }
  