Google interview question

Medium hard question on graphs