Algorithm visualizer
Pick an algorithm, enter your own numbers or use a preset, then step through the run. The pseudocode and the explanation follow each step.
Check each value in turn until the target appears or the array runs out. Works on any array, sorted or not.
Change the target to a value that appears twice. Which index does the search return, and why?
Step 1 of 5
Look for 9, checking from index 0 upward.