Given an absolute path for a file (unix style), simplify it so it returns a canonical path.
Some example:
/home => /home
/a/./b/…/…/c => /c
/a/b/… => /a
/a/./b/ => /a/b
/…/ => /
Given an absolute path for a file (unix style), simplify it so it returns a canonical path.
Some example:
/home => /home
/a/./b/…/…/c => /c
/a/b/… => /a
/a/./b/ => /a/b
/…/ => /
原题 Simplify Path 吧
厉害了 这都有
我是拿Stack做的 遇到..
就是pop