CIS 2500 Lecture Notes - Lecture 9: Quicksort, Binary Search Algorithm, Horse Length

71 views4 pages

Document Summary

Quick sort diagram with the pivot example will be on the final exam and we want to reproduce it with a much smaller example. Have to show the diagram and how to split the data. An algorithm is a sequence of actions (like a recipe) Algorithms can be analyzed as to their use of space and time. Algorithms move from an initial state and proceed through a number of actions until a terminating conditions is reached. We can talk about the world before (pre), during and after (post) an algorithm. Post is about what you want the algorithm to accomplish and how it changes the pre state. Linear search start at the first elelment in an array and compare each element to the value you are looking for. Binary search this search requires ordered data but is much faster than linear searching start with the middle value and keep dividing the array is half ntil the value is found.

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