Coinbase interview question

Graph / backtrack leetcode medium