<awangdev>Flip Game II_2.java
public static boolean canWin(String s) {
        if (s == null || s.length() <= 1) {
            return false;
        }
        StringBuilder sb = new StringBuilder(s);
        while (sb.indexOf("++") != -1) {
            int index = sb.indexOf("++");
            if(!canWin(s.substring(0, index) + "--" + s.substring(index + 2))) {
                return true;
            }
            sb.replace(index, index + 1, "-");
        }
        return false;
    }
public static boolean sample_funcname ( String s ) {
  if ( s == null || s . length ( ) <= 1 ) {
    return false ;
  }
  StringBuilder sb = new StringBuilder ( s ) ;
  while ( sb . indexOf ( "++" ) != - 1 ) {
    int index = sb . indexOf ( "++" ) ;
    if ( ! canWin ( s . substring ( 0 , index ) + "--" + s . substring ( index + 2 ) ) ) {
      return true ;
    }
    sb . replace ( index , index + 1 , "-" ) ;
  }
  return false ;
}
