leetcode
71. Simplify Path
Solution code
Time complexity: O(n)
Space complexity: O(n)