comefrom: <gouthampradhan>string_SimplifyPath_1.java
code: public String simplifyPath(String path) {
      if (path == null || path.isEmpty()) return "/";
      StringTokenizer st = new StringTokenizer(path, "/");
      Deque<String> dQueue = new ArrayDeque<>();
      while (st.hasMoreTokens()) {
        String token = st.nextToken();
        if (token.trim().equals("..")) {
          if (!dQueue.isEmpty()) dQueue.pop();
        } else if (token.trim().equals(".")) {
        } else dQueue.push(token);
      }
      if (dQueue.isEmpty()) return "/";
      StringBuilder finalStr = new StringBuilder();
      while (!dQueue.isEmpty()) {
        finalStr.append("/").append(dQueue.removeLast());
      }
      return finalStr.toString();
    }
masked: public String var_0 ( String var_1 ) {
    if ( var_1 == null || var_1 . isEmpty ( ) ) return "/" ;
    StringTokenizer var_2 = new StringTokenizer ( var_1 , "/" ) ;
    Deque < String > var_3 = new ArrayDeque < > ( ) ;
    while ( var_2 . hasMoreTokens ( ) ) {
      String var_4 = var_2 . nextToken ( ) ;
      if ( var_4 . trim ( ) . equals ( ".." ) ) {
        if ( ! var_3 . isEmpty ( ) ) var_3 . pop ( ) ;
      }
      else if ( var_4 . trim ( ) . equals ( "." ) ) {
      }
      else var_3 . push ( var_4 ) ;
    }
    if ( var_3 . isEmpty ( ) ) return "/" ;
    StringBuilder var_5 = new StringBuilder ( ) ;
    while ( ! var_3 . isEmpty ( ) ) {
      var_5 . append ( "/" ) . append ( var_3 . removeLast ( ) ) ;
    }
    return var_5 . toString ( ) ;
  }
  