CSE 214 Lecture Notes - Lecture 1: Big O Notation

55 views2 pages

Document Summary

Used to describe the performance or complexity of an algortihm. Big o specifically describes the worst- case scenario and can be used to describe the execution time required or the space used by an algorithm. How to determine big o notation: different steps get added, drop constants, different inputs = different variables, drop non dominate terms. Describes an algorithm that will always execute in the same time regardless of the size of the inout data set. If each statement is "simple" (only involves basic operations) then the time for each statement is constant and the total time is also constant: o(1). 4 bool isfirstelementnull(ilist elements) return elements[0] == null; Describes an algorithm whose performance will grow linearly and in direct proportion to the size of the input data set. bool containsvalue(ilist elements, string value) foreach (var element in elements) if (element == value) return true;

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