GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

In a binary max heap containing n numbers, the smallest element can be found in time

A

0(n)

B

O(logn)

C

0(loglogn)

D

0(1)

asked in data structures and algorithms by gate

1 Answer

0 votes
the smallest element is always present at a leaf node. So we need to check for all leaf nodes for the minimum value. Worst case complexity will be O(n)
answered by gate

Related questions

The best answer to any question