Domanda di colloquio di Splunk

BFS graph question and a greedy algorithm question.