Meta interview question

71. Simplify path on LeetCode