CSC 2200 Lecture Notes - Lecture 4: Dspace, Mathematical Puzzle, Time Complexity

10 views4 pages
CSC 2200 lecture 4
Recursion
o Some computer programming languages allow a module or function to call itself.
This technique is known as recursion
o In recursion, a function α either calls itself directly or calls a function β that in
turn calls the original function α. The function α is called recursive function.
o Example
Properties of recursion
o A recursive function can go infinite like a loop. To avoid infinite running of
recursive function, there are two properties that a recursive function must have
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.