Applied Intuition interview question

Graph based common leetcode question