ACO 101 Study Guide - Final Guide: Pseudocode, Doina, Big O Notation

61 views4 pages
18 Mar 2015
School
Course
Professor

Document Summary

Often, a certain problem can be solved by several different correct algorithms, which might have different ef ciency. For example, suppose i want to nd a good time to schedule a tutorial for. To do this, i might want to know how many students from comp-250 also take. Comp-206, math-133 etc. , in order to avoid con icts. So now suppose that i have two lists of students (for two courses) in arrays a and b, and i want to compute the number of elements in common. We assume, for simplicity, that there are no duplicate elements in any array (this is true if they are indeed student lists). Ideally, we would like to get an algorithm that also runs fast (for instance, in terms of the number of comparisons it requires). The simplest solution is to loop through a, and for each of its elements, look it up in b.

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

Related textbook solutions

Related Documents

Related Questions