Binary search: Examples & Code
Binary search: Search an ascending array; the visualization sorts your input first. Explore a worked example, complexity and tested code.
Explore algorithm visualizations code snippets and tutorials
Binary search: Search an ascending array; the visualization sorts your input first. Explore a worked example, complexity and tested code.
Linear search: Inspect values sequentially. Explore a worked example, complexity and tested code.
Radix sort (LSD): Stably group values by each decimal digit, starting with units. Explore a worked example, complexity and tested code.
Counting sort: Count each integer, then reconstruct the sorted array. Explore a worked example, complexity and tested code.
Gnome sort: Walk forward when ordered and backward after a swap. Explore a worked example, complexity and tested code.