Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Net 12

CBSE NET DECEMBER 2007 PAPER II

The height of a binary tree with ‘n’ nodes in the worst case is 

(A)  0(log n)
(B)  O(n)
(C)  Ω(n log n)
(D)  Ω(n2)

Ans:- B

Explanation:-
Big omega notation is used for representing the average case. Big oh notation is used for representing the worst case. Big oh is a measure of the longest amount of time it could possibly take for any algorithm to complete. Since we are representing the height of a binary tree, it would be the maximum height possible in a tree with ‘n’ nodes and it is O(n). So, the correct answer is B.

Leave a Comment