1.

How many edges will a tree consisting of N nodes have?(a) Log(N)(b) N(c) N – 1(d) N + 1I got this question in unit test.This is a very interesting question from Graph Coloring in portion Graph Coloring of Data Structures & Algorithms II

Answer»

The CORRECT answer is (c) N – 1

Easy explanation - In ORDER to have a fully CONNECTED tree it MUST have N-1 edges. So the correct answer will be N-1.



Discussion

No Comment Found

Related InterviewSolutions