Net 12

October 16, 2017 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

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.

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion