Simplify the solution to path sum ii