Skip to content

Conversation

@amb54
Copy link

@amb54 amb54 commented Apr 4, 2017

Recursion Tracing

Thanks for doing some brain yoga. You are now submitting this assignment!

Comprehension Questions

Question Answer
Did you define all the recursion terms? All, but the last one about tail recursion
How do you feel about tracing recursive problems? (good, bad, ugly, neutral) good. kind of fun : )
Would you like help/follow up about recursion? I do not have a clear view of what tail recursion is.

- What is mystery2(123)?
- What is mystery2(9005)?
- What is mystery2(-123)?
- What is mystery2(123)? 5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check this one

- Activation Chain/Stack: The process when the method calls itself. (All the bubbles. The last bubble, before going up the chain again is the base case.)
- Activation Record/Call: Each call (One of the bubbles)
- Infinite Recursion/Stack Overflow/Stack too deep: When the base case is never reached.
- Tail Recursion:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't actually cover tail recursion in class. We may in the future, but it's not necessary to know this moment.

- Infinite Recursion/Stack Overflow/Stack too deep
- Tail Recursion
- Recursion: A method that calls itself.
- Recursive Case: The smaller problem that calls itself till the base case is hit.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "till the base case is hit" only because you don't technically have to hit a base case.

@sudocrystal
Copy link

looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants