Back to the 2019 paper

Module 4: Graph and Tree Algorithms

20192m

Which of the following is an advantage of adjacency list representation over adjacency matrix representation of a graph?

  • (i) In adjacency list representation, space is saved for sparse graphs.
  • (ii) DFS and BFS can be done in O(V+E)O(V+E) time for adjacency list representation. These operations take O(V2)O(V^2) time in adjacency matrix representation.
  • (iii) Adding a vertex in adjacency list representation is easier than adjacency matrix representation.
  • (iv) All of the above

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.