[LC] Added solution to simplify path.