COIS 2240H Lecture Notes - Lecture 3: Mathematical Induction

56 views2 pages

Document Summary

Recursion: a recursive method is a method that calls itself. Recursive functions: two main components are required for every recursive function, the first, the base call, returns a value without making any subsequent recursive call. The second main component od a recursive function is: the reduction step. Recursion in math: the equivalent to recursive programming in math is mathematical induction (weak) Talking about things in the abstract is very difficult. Iteration: many different functions that could be implemented using recursion can also be implemented using iteration. Iteration is the process of repeating an instruction until a condition is met. For loop: most popular loop we can utilize in order to iterate. In certain instances the execution time will be so low that you cannot measure it in seconds. Timing in java: measusirng execution time can be tricky, we need to import a class in order to be able to use timing tools.

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