1. Home
  2. Computer Science MCQs
  3. Algorithms and Data Structures
  4. How many edges does a tree with n vertices have?

Added 2 Nov 2026

How many edges does a tree with n vertices have?

  1. 2n
  2. n + 1
  3. n − 1 Correct answer
  4. n

Correct answer

C. n − 1

19 views

MCQSEXAM

Explanation

A tree is connected and acyclic, so it has exactly n − 1 edges. Adding any edge creates a cycle, and removing one disconnects the tree.

Reference

Asked in: GATE CS, NTS, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Algorithms and Data Structures MCQs

Practise all Algorithms and Data Structures MCQs

Similar MCQs