Interpolation search: Examples & Code
Interpolation search: Estimate a position from the value range. Best suited to uniformly distributed sorted values. Input is sorted before searching. Explore…
Explore algorithm visualizations code snippets and tutorials
Interpolation search: Estimate a position from the value range. Best suited to uniformly distributed sorted values. Input is sorted before searching. Explore…
Exponential search: Double the search range, then run binary search within it. Input is sorted before searching. Explore a worked example, complexity and…
Pancake sort: Flip prefixes to move the largest remaining value to its final position. Explore a worked example, complexity and tested code.
Odd–even sort: Alternate odd and even neighbor comparisons until a full round makes no swaps. Explore a worked example, complexity and tested code.
Comb sort: Shrink the comparison gap before finishing with neighboring comparisons. Explore a worked example, complexity and tested code.