The maximum number of edges in a n-node undirected graph without self loops is
(B) n * (n-1)/2
(C) n – 1
(D) (n + 1) * n/2
Explanation: A complete graph can have a maximum edges for ‘n’ nodes as each node is connected to every other node. So, for n nodes, maximum n * (n-1)/2 nodes are possible.
Option (B) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.