Algorithms
First observe the behavior in Explore mode, then switch to Apply to test each operation with intent.
Binary search is an efficient searching algorithm that works on sorted arrays by repeatedly dividing the search space in half, achieving O(log n) time complexity.
Prerequisite: Array must be sorted
Standard: Find exact match → O(log n)
Binary search needs sorted data. Track LOW, MID, HIGH range visually.
Ready|Waiting for a binary search
Time: O(log n)|Space: O(1)
Pseudocode
Binary search works only on sorted data because each comparison discards half the range.
Explore mode: click elements to inspect index and sorted order.
Divide and Conquer: Split search space in half each time
Prerequisite: Array must be sorted
In Apply mode, test one operation and explain its complexity before running the next.
Before clicking run, predict the next index/pointer movement and then verify it.