Applied Intuition Interview Question

Leetcode hard (graph traversal question)