comefrom: <awangdev>Backspace String Compare_1.java
code: private String type(String s) {
  
          Stack<Character> stack = new Stack<>();
          for (char c : s.toCharArray()) {
              if (c == '#') {
                  if (!stack.isEmpty()) stack.pop();
              } else {
                  stack.push(c);
              }
          }
          StringBuffer sb = new StringBuffer();
          while (!stack.isEmpty()) {
              sb.append(stack.pop());
          }
          return sb.toString();
      }
masked: private String var_0 ( String var_1 ) {
    Stack < Character > var_2 = new Stack < > ( ) ;
    for ( char var_3 : var_1 . toCharArray ( ) ) {
      if ( var_3 == '#' ) {
        if ( ! var_2 . isEmpty ( ) ) var_2 . pop ( ) ;
      }
      else {
        var_2 . push ( var_3 ) ;
      }
    }
    StringBuffer var_4 = new StringBuffer ( ) ;
    while ( ! var_2 . isEmpty ( ) ) {
      var_4 . append ( var_2 . pop ( ) ) ;
    }
    return var_4 . toString ( ) ;
  }
  