Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Start from top-right. If current is greater than target, move left; if smaller, move down. Each move drops a whole row/column that cannot contain the target.
In each step, sorted order guarantees one full row or one full column is eliminated, so the search region shrinks in linear combined steps.
Updated Feb 2026