Graph Problem, Memory Limit Exceeded
Hi there, could anyone take a look at my submission and advise me on what to change so as to pass the test cases. I keep getting memory limit exceeded for the 17th test case. 75599734. Thank you!!!