Splunk Interview Question

DFS problem, leetcode medium in 1 round, leetcode easy in 2 round