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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents