Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. In a binary max heap containing n numbers, the smallest element can be found in time
    1. O (n)
    2. O (log n)
    3. O (log log n)
    4. O (1)
Correct Option: A

Time taken by binary max heap to identify the max element is O(1). Therefore, the time taken by binary max heap to identify the smallest element is O(n).



Your comments will be displayed only after manual approval.