We now consider different methods of searching large amounts of data to find one particular piece of information. This chapter focuses on four general types of searching, that is, sequential, binary, indexed search, and hashing schemes. The purpose here is not to present an exhaustive review of all possible search techniques, but to highlight how the main technique can be implemented.

We first define some common terms. A table or a file is a collection of elements, each of which is called a record. Each record consists of a set of fields. One of the field has a special meaning called key field. Such key is also called an internal key. Sometimes there is a separate table of keys that include pointers to the records. ...

Get Data Structures Using C now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.