01:198:111 Lecture Notes - Lecture 21: Boolean Algebra, Computer Architecture, Linear Equation

70 views2 pages
Verified Note

Document Summary

The runtime of a program depends on many factors. The efficiency of an algorithm is based on: How many total operations the algorithm performs. How much memory is used by the algorithm. This is actually six operations since reading the variable is one operations and setting the variable is another. This makes the number of total operations as 6n, n being the number of times the for loop runs. T(n)=6n - linear equation of the amount of operations. This equation means that the time to execute the program is proportional to the number of times the program runs. Int n=a. length; for (int i=0; i

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