# UGC-NET | UGC NET CS 2015 Jun – II | Question 4

Consider the following statements:
(a) Depth – first search is used to traverse a rooted tree.
(b) Pre – order, Post-order and Inorder are used to list the vertices of an ordered rooted tree.
(c) Huffmanâ€™s algorithm is used to find an optimal binary tree with given weights.
(d) Topological sorting provides a labelling such that the parents have larger labels than their children.
Which of the above statements are true?

(A) (a) and (b)
(B) (c) and (d)
(C) (a), (b) and (c)
(D) (a), (b), (c) and (d)

Explanation:

• Depth – first search is used to traverse a rooted tree. Correct
• Pre – order, Post-order and Inorder are used to list the vertices of an ordered rooted tree. Correct
• Huffmanâ€™s algorithm is used to find an optimal binary tree with given weights.
• Correct
• Topological sorting provides a labelling such that the parents have larger labels than their children.Correct

So, option (D) is correct.

Quiz of this Question

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Previous
Next