CPE 102 Chapter 2.1-2.4: 2.1-2.4 4.1-4.4 Notes

29 views2 pages

Document Summary

We need to be able to run code with accuracy, but also with as much efficiency as possible. Order of magnitude functioning, or big-o (o for order) provides a useful guess as to how many steps are needed to complete a computation. The number of times that a variable needs to be considered/ processed in a program will determine its big-o. Ex) a for loop where n is processed twice = o(n^2) As computer scientists, we need to consider how our functions will perform under different conditions of varying inputs in respect to time and computational stress on the system. Recursion is a method of solving problems by creating sub problems and subproblems of those until you can solve it very easily. To recursively add up a list of numbers, we would just add two numbers at . Time until there were only two numbers left to add together. The rules or recursion are as follows.

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 textbook solutions

Related Documents