Google interview question

typical leetcode challenges like ones with graph