+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is the number of edges present in a complete graph having n vertices?

(a) (n*(n+1))/2

(b) (n*(n-1))/2

(c) n

(d) Information given is insufficient

The origin of the question is Graph topic in portion Graph of Data Structures & Algorithms I

This question was addressed to me in an interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Right answer is (b) (n*(n-1))/2

Easy explanation - Number of ways in which every vertex can be connected to each other is nC2.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...