Print All Paths With Minimum Jumps Leetcode Javascript