Off-by-one error(fencepost error)
A count that is one too many or one too few, usually at the first or last item. The classic cause is mixing a length with a last index: an array of 5 items has indexes 0 to 4.
- See also: Index
- See also: Edge case
- Used in: Logic & Problem Solving
- Used in: Data Structure Basics