comefrom: <awangdev>1048. Longest String Chain_1.java
code: public int longestStrChain(String[] words) {
          int rst = 0;
          Arrays.sort(words, Comparator.comparing(a -> a.length()));
          HashMap<String, Integer> wordChainMap = new HashMap();
          for (String word : words) {
              if (wordChainMap.containsKey(word)) continue;
              wordChainMap.put(word, 1);
              for (int i = 0; i < word.length(); i++) {
                  StringBuilder sb = new StringBuilder(word);
                  sb.deleteCharAt(i);
                  String lastWord = sb.toString();
                  if (wordChainMap.containsKey(lastWord) && wordChainMap.get(lastWord) + 1 > wordChainMap.get(word)) {
                      wordChainMap.put(word, wordChainMap.get(lastWord) + 1);
                  }
              }
              if (wordChainMap.get(word) > rst) rst = wordChainMap.get(word);
          }
          return rst;
      }
masked: public int sample_funcname ( String [ ] var_0 ) {
    int var_1 = 0 ;
    Arrays . sort ( var_0 , Comparator . comparing ( var_2 -> var_2 . length ( ) ) ) ;
    HashMap < String , Integer > var_3 = new HashMap ( ) ;
    for ( String var_4 : var_0 ) {
      if ( var_3 . containsKey ( var_4 ) ) continue ;
      var_3 . put ( var_4 , 1 ) ;
      for ( int var_5 = 0 ;
      var_5 < var_4 . length ( ) ;
      var_5 ++ ) {
        StringBuilder var_6 = new StringBuilder ( var_4 ) ;
        var_6 . deleteCharAt ( var_5 ) ;
        String var_7 = var_6 . toString ( ) ;
        if ( var_3 . containsKey ( var_7 ) && var_3 . get ( var_7 ) + 1 > var_3 . get ( var_4 ) ) {
          var_3 . put ( var_4 , var_3 . get ( var_7 ) + 1 ) ;
        }
      }
      if ( var_3 . get ( var_4 ) > var_1 ) var_1 = var_3 . get ( var_4 ) ;
    }
    return var_1 ;
  }
  