COM SCI 32 Lecture Notes - Lecture 1: Linear Search, Object-Oriented Programming, Local Variable

21 views4 pages

Document Summary

A set of instructions that solves a particular problems: each algorithm operates on input data and produces an output result. Classified by how long it takes to run and/or the quality of its results. Guess by random in 100,000 guesses: linear search. If there are 100,000 total words in our dictionary, on average, we need 50,000 to get to the word: binary search. Search area: starting from the entire dict. Worst case: keep dividing until we only have one word 17 steps: data structure. A set of variables that an algorithm uses to solve a problem. To solve a problem, you need to design both the algorithm and data structure: interface. For the set of data structures/algorithms, it helps to have a few simple functions that hide the gory details: abstract data type(adt) A coordinated group of a) data structures, b) algorithms, and c) interface functions that is used to solve a particular problem.

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