COMPSCI 92L Lecture Notes - Lecture 4: Binary Search Algorithm, Autocomplete

33 views2 pages

Document Summary

Different types of cars: uber, uberxl, uberselect (need insurance certification) Surge pricing: as demand for cars at a certain time/day of the week, baseline price goes up. Depends on both location of cars and time of day. Taxis have a flat rate regardless of demand. First engineered by cs researchers at northeastern. Can defeat surge pricing by walking certain blocks - algorithm is geographically centered. Algorithms must work with scale: our algorithm generating team is a pragmatic melding of algorithm design and massive scale . 7 ideas of cs: creativity, abstraction, data/info, algorithms, programming, internet, global impact. An alternate, more succinct definition of computer science is the study of automating algorithmic processes that scale. Write binary search algorithm to guess number from 1-100, 1-n where upper limit of n = infinity (autocomplete): Label the target value as your key, label the user"s guess as a variable named guess. Have an ascending order list of all possible numbers.

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