AlgoScope

Find Minimum and Maximum

The minimum is all the way left and the maximum all the way right. One path each.

Tree algorithms, algorithm, beginner
At 50. Moving left.2030354050607080current
At 50. Moving left.2030354050607080current

BST Queries: Find the minimum

Decision, step 2 of 5

50 has a left child, so something smallest is still below. Keep going.

Cost

Best
O(1)
Average
O(log n)
Worst
O(n)
Space
O(1)

Leads to

Topics that need this one first.

Taught by the same lesson

BST Queries covers these too, in the same run.