Loading…

Textbook errors in binary searching

This paper discusses the specification and implementation of binary searching. It begins by presenting a “standard” set of declarations, a specification, and a binary searching procedure written in Pascal. This procedure does not meet the specification: it contains five errors that also occur in man...

Full description

Saved in:
Bibliographic Details
Published in:SIGCSE bulletin 1988-02, Vol.20 (1), p.190-194
Main Author: Pattis, Richard E.
Format: Article
Language:English
Citations: Items that cite this one
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:This paper discusses the specification and implementation of binary searching. It begins by presenting a “standard” set of declarations, a specification, and a binary searching procedure written in Pascal. This procedure does not meet the specification: it contains five errors that also occur in many CS-1 and CS-2 textbooks. We will locate and study these errors, and show alternative procedures that correct them in a simple and understandable way.
ISSN:0097-8418
DOI:10.1145/52965.53012