1.

With V(greater than 1) vertices, how many edges at most can a Directed Acyclic Graph possess?(a) (V*(V-1))/2(b) (V*(V+1))/2(c) (V+1)C2(d) (V-1)C2Enquiry is from Directed Acyclic Graph topic in division Graph of Data Structures & Algorithms IThe question was posed to me during an interview for a job.

Answer»

The correct answer is (a) (V*(V-1))/2

Easiest EXPLANATION - The first edge WOULD have an OUTGOING degree of atmost V-1, the next edge would have V-2 and so on, hence V-1 + V-2…. +1 equals (V*(V-1))/2.



Discussion

No Comment Found

Related InterviewSolutions