Intuit interview question

It was a kinda easy graph problem.