CPE 102 Chapter 2.1-2.4: 2.1-2.4 4.1-4.4 Notes
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.