<awangdev>727. Minimum Window Subsequence_3.java
public String minWindow(String s, String t) {
       
        int sIndex = 0, tIndex = 0, start = -1;
        int m = s.length(), n = t.length(), minLength = m;
        char[] ss = s.toCharArray(), tt = t.toCharArray();
    
        while (sIndex < m) {
            if(ss[sIndex] == tt[tIndex]) { 
                if(++tIndex == n) { 
                    int end = sIndex + 1;
                        
                    while(--tIndex >= 0) {
                        while(ss[sIndex--] != tt[tIndex]);
                    }
                    sIndex++;
                    tIndex++;
                    
                    if (end - sIndex < minLength) {
                        minLength = end - sIndex;
                        start = sIndex;
                    }
                }
            }
            ++sIndex;
        }
        return start == -1 ? "" : s.substring(start, start + minLength);
    }
public String var_0 ( String var_2 , String var_3 ) {
  int var_5 = 0 , var_6 = 0 , var_8 = - 1 ;
  int var_10 = var_2 . length ( ) , var_11 = var_3 . length ( ) , var_12 = var_10 ;
  char [ ] var_14 = var_2 . toCharArray ( ) , var_15 = var_3 . toCharArray ( ) ;
  while ( var_5 < var_10 ) {
    if ( var_14 [ var_5 ] == var_15 [ var_6 ] ) {
      if ( ++ var_6 == var_11 ) {
        int var_16 = var_5 + 1 ;
        while ( -- var_6 >= 0 ) {
          while ( var_14 [ var_5 -- ] != var_15 [ var_6 ] ) ;
        }
        var_5 ++ ;
        var_6 ++ ;
        if ( var_16 - var_5 < var_12 ) {
          var_12 = var_16 - var_5 ;
          var_8 = var_5 ;
        }
      }
    }
    ++ var_5 ;
  }
  return var_8 == - 1 ? "" : var_2 . substring ( var_8 , var_8 + var_12 ) ;
}
