COMPSCI 61B Lecture Notes - Lecture 26: Total Order, Binary Search Algorithm, Big O Notation

14 views4 pages
16 Apr 2019
School
Professor

Document Summary

This is a useful task in its own right. Equivalent items are adjacent, allowing rapid duplicate finding. Items are in increasing order, allowing binary search. Can be converted into various balanced data structures. Also provide interesting case studies for how to approach basic computational problems. Some of the solutions will involve using data structures we"ve studied. An ordering relation < for keys a, b, and c has the following properties. Exactly one of a < b, a = b, b < a is true. An ordering relation with the porperties above is also known as total order . A sort is a permutation (re-arrangement of a sequence of elements that puts the keys into non-decreasing order relative to a given ordering relation. Ordering relations are typically given in the form of compareto or compare methods. Not that with respect to the order defined, the = get if just checking for lengeth.

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