0034. Find First and Last Position of Element in Sorted Array

Two Binary Searches: Left Bound + Right Bound | O(log n) Time

Ready — Press Step or Play to begin

Search Phase

Not started

Pointers

lo=? hi=? mid=?

Result (so far)

[-1, -1]
No occurrence found yet

Step

0
Total binary search steps
5x

Step Log