True or False: A preorder traversal of a binary search tree will output the valu
ID: 3832142 • Letter: T
Question
True or False: A preorder traversal of a binary search tree will output the values in sorted order. The cost of searching in an AVL tree is theta (log n). In a topological ordering of the vertices of a DAG, if a vertex v comes after a vertex u in the ordering, then there is a directed path from u to v. Suppose we have a directed graph G = (V, E) that is strongly connected. For any depth-first search of G, if all the forward edges of G (with respect to the depthfirst forest) are removed from G, he resulting graph is still strongly connected.Explanation / Answer
a) Preorder Traversal of BST will give Sorted Order : FALSE
Inorder Gives us Sorted order and not Preorder
b) Cost of Searching in AVL tree is O(log n) : TRUE
AVL is height balanced tree, Max height is log n, so cost of searching is log n
c)TRUE , Topological Ordering follows this convenction of ordering
d) TRUE , Even if we remove forward edges the graph will be String,ly connected because there is still a path from that vertices to the other
Thanks, let me know if theer is any concern.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.