Domanda di colloquio di TikTok

Asked a Leetcode hard graph question