Skip to content

Glossary: Data Structures and Algorithms in Java

off-by-one error

A mistake of exactly one in an index or comparison, such as `while (low < high)` instead of `<=` or `low = middle` instead of `middle + 1` in binary search.

Where the book teaches it

Related terms

binary search