Fieldwire interview question

Graph leetcode question in 1-hour LeetCode-style interview