Path With Given Sequence Leetcode Contest