<awangdev>Interleaving String_4.java
public boolean isInterleave(String s1, String s2, String s3) {
        if (s3 == null || (s1 == null && s2 == null) || s1.length() + s2.length() != s3.length()) {
        	return false;
        }

        int i = 0; 
        int j = 0;
        String base = "";
        for (int k = 0; k < s1.length()*s2.length() - 1; k++) {
        	if (i < s1.length() || j < s2.length()) {
	        	if (i < s1.length() && s3.indexOf(base + s1.charAt(i)) == 0) {
	        		base += s1.charAt(i);
	        		i++;
	        	} else if (j < s2.length() && s3.indexOf(base + s2.charAt(j)) == 0) {
	        		base += s2.charAt(j);
	        		j++;
	        	} else {
	        		return false;
	        	}
        	}
        }
        return true;
    }
public boolean var_0 ( String var_2 , String var_3 , String var_4 ) {
  if ( var_4 == null || ( var_2 == null && var_3 == null ) || var_2 . length ( ) + var_3 . length ( ) != var_4 . length ( ) ) {
    return false ;
  }
  int var_8 = 0 ;
  int var_9 = 0 ;
  String var_11 = "" ;
  for ( int var_12 = 0 ;
  var_12 < var_2 . length ( ) * var_3 . length ( ) - 1 ;
  var_12 ++ ) {
    if ( var_8 < var_2 . length ( ) || var_9 < var_3 . length ( ) ) {
      if ( var_8 < var_2 . length ( ) && var_4 . indexOf ( var_11 + var_2 . charAt ( var_8 ) ) == 0 ) {
        var_11 += var_2 . charAt ( var_8 ) ;
        var_8 ++ ;
      }
      else if ( var_9 < var_3 . length ( ) && var_4 . indexOf ( var_11 + var_3 . charAt ( var_9 ) ) == 0 ) {
        var_11 += var_3 . charAt ( var_9 ) ;
        var_9 ++ ;
      }
      else {
        return false ;
      }
    }
  }
  return true ;
}
