@@ -0,0 +1,970 @@
+public class Solution %7B%0A    public String simplifyPath(String path) %7B%0A       %0A       StringBuilder result=new StringBuilder();%0A        %0A       if (path==null %7C%7Cpath.length()==0)%7B%0A           return result.toString();%0A       %7D%0A       %0A       String%5B%5D strs=path.split(%22/%22);%0A       %0A       Stack%3CString%3E stack=new Stack%3CString%3E();%0A %0A       for (String s: strs)%7B%0A           %0A           if (s.length()==0 %7C%7Cs.equals(%22.%22))%7B%0A               %0A           %7D%0A           else if (s.equals(%22..%22))%7B%0A               if (!stack.isEmpty())%7B%0A                   stack.pop();%0A               %7D%0A           %7D%0A           else%7B%0A               stack.push(s);%0A           %7D%0A           %0A       %7D%0A       %0A       if (stack.isEmpty())%7B%0A           result.append('/');%0A           %0A       %7D%0A       else%7B%0A           %0A           while (!stack.isEmpty())%7B%0A               result.insert(0, stack.pop());%0A               result.insert(0, '/');%0A           %7D%0A       %7D%0A       %0A       return result.toString();%0A    %7D%0A%7D%0A

Create SimplifyPath_001.java