CMPSC 40 Chapter Notes - Chapter 3.1-3.3: Insertion Sort, Linear Search, Halting Problem

49 views3 pages
1 Nov 2017
School
Course
Professor

Document Summary

Algorithm = a finite sequence of precise instructions for performing a computation or for solving a problem. Pseudocode provides an intermediate step between an english language description of an algorithm and an implementation of this algorithm in a programming language. For each input, the algorithm produces an output. The steps of an algorithm must be defined precisely. The algorithm should produce the correct output values for each set of input values. The algorithm should produce the output after a finite number of steps for any input. The algorithm must perform each step in a finite amount of time. The procedure should be applicable for all problems of the desired form. Searching problems = problems involving locating an element in an ordered list. Compares successively with each term of the list until a match is found. Compares the element to be located to the middle term of the list. List is split into two smaller sublists of approximately the same size.

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