How to solve Leetcode 797. All Paths From Source to Target