Question

A data analysis application needs to quickly find the minimum or maximum value in a dynamically changing dataset. While a min/max heap could be used, how would a BST perform this task?

A By traversing the entire tree (O(n))
B By accessing the root node (O(1))
C By traversing only the left-most path for minimum (O(h)) or right-most path for maximum (O(h))
D By performing a level-order traversal
E By using a hash function
Practice Next

Hey! Ask a query