Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. Maximum number of edges in a n-node undirected graph without self loops is
    1. n2
    2. n(n - 1)
      2

    3. n - 1
    4. (n + 1)(n)
      2
Correct Option: B

Total no. of nodes = n
For an edge of n nodes we select any 2 which make a graph.
So, nc2 → n(n – 1) / 2 edges
n = 4 ; (4 × 3) / 2 = 6



Your comments will be displayed only after manual approval.