1.

Time complexity to find if there is an edge between 2 particular vertices is _________(a) O(V)(b) O(E)(c) O(1)(d) O(V+E)My question is taken from Adjacency List in portion Graph of Data Structures & Algorithms IThe question was asked in exam.

Answer»

Correct OPTION is (a) O(V)

For EXPLANATION: The maximum edges a VERTEX can have is V-1.



Discussion

No Comment Found

Related InterviewSolutions