Oscar Health interview question

simplify path leetcode question