Grading policy: 4 marks each for correct output of test cases (total 8 marks) 4 marks for logical correctness of part 1 (total 4 marks) 4 marks for logical correctness of part 2 (total 4 marks) 2 marks for indentation (total 2 marks) 2 marks for comments (total 2 marks) Deduct 1 mark if dynamic memory allocation is not used Deduct 1 mark if adjacency list of size O(1) is not used Deduct 1 mark if global/static variable is used Deduct 4 marks if STL is used Total marks: 20