Skip to content

Glossary: Data Structures and Algorithms

Off-by-one error

Also written: off-by-one

A mistake of exactly one in an index or comparison, like writing `while low < high` instead of `<=` in binary search.

Where the book teaches it

Related terms

Binary search