L23recursion

L23recursion - Function Recursion Questions on Recursion q...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Function Recursion
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Questions on Recursion define recursion, recursive function definition what is function invocation? how is function invocation related to function definition? What is special about invocation of a recursive function? what is program stack? stack frame? what happens with stack if recursive function is invoked multiple times? What is the scope of automatic variables in a recursive function invocation? what is stopping case? stack overflow? infinite recursion? how is recursion related to iteration?
Background image of page 2
Outline why using recursion recursion example: printing digits how recursion works how to code recursion recursion vs. iteration
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Why recursion in top-down design one of the major techniques is to break the task into subtasks and code the tasks separately it may turn out that one of the subtasks is a smaller version of the larger task example: to search an array you split it into halves, searching each half is similar to searching the whole
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

L23recursion - Function Recursion Questions on Recursion q...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online