Print All Paths Leetcode Javascript Question