TikTok interview question

Leetcode graph and dfs mediums