$ cat ./coding/71-simplify-path.md
[Coding]
71. Simplify Path
────────────────────────────────────────────────────────────
class Solution:
def simplifyPath(self, path: str) -> str:
tmp = path.split('/')
res = []
for item in tmp:
if item == '' or item == '.':
continue
elif item == '..':
if len(res) > 0:
res.pop()
else:
res.append(item)
return "/" + "/".join(res)
--tags#Stack
$ ls ./coding/ | grep -v 71-simplify-path