tailieunhanh - Data Structures and Algorithms - Chapter 5 -Searching

We are given a list of records. Each recordis associated with a key. We are given one key (target), and are asked to search the list to find the record(s) whose key is the same as the target. May be more than one recordwith the same key. May be no record with a given key. | Chapter 5 - Searching Sequential Search In an unordered list In an ordered list Binary Search Forgetful Version Recognizing Equality Comparison Tree Linked List vs. Contiguous List 1 Searching We are given a list of records. Each record is associated with a key. We are given one key target and are asked to search the list to find the record s whose key is the same as the target. May be more than one record with the same key. May be no record with a given key. 2 Searching We often asked how many times one key is compared with another during a search. Internal searching all records are kept in the high-speed memory. External searching most of the records are kept in disk files.