CPSC 319 Lecture Notes - Lecture 3: Linear Search, Data Element, Binary Search Algorithm

106 views3 pages

Document Summary

Record: the data pertaining to a unique object: sometimes called an element, consists of one or more fields. Field: a constituent part of a record, usually consisting of a single data element: has a specified type and size. Key: the data field used to select or order records: may or may not be unique for a set of records. Primary key: the field used first for selecting or sorting records: e. g. Secondary key: the field used if 2 or more records have equal primary keys: e. g. Satellite data: data in the non-key fields, not used when sorting or selecting records: e. g. Search: an operation that returns a pointer to a record that matches a key value or nil. Sorting: arranges the items of a list into ascending (or descending) order comparing keys. Basic idea: starting at the beginning of a list, compare each successive item to a query key until we find a match or reach end of the list.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents