Solution to Simplify Path