Skip to content

Added answers to README.md questions. #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added answers to README.md questions. #19

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 27, 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? Yes
How do you feel about tracing recursive problems? (good, bad, ugly, neutral) Okay/neutral. During class, I was very slow to start the problems but as I did them on my own at home I felt a bit better about them. I would need more time to think about the 'Added fun' problems.
Would you like help/follow up about recursion? Not necessarily unless my explanations are unclear; I do think I would benefit from doing some harder problems or dedicating some time to the 'Added fun' problems.

- Tail Recursion
- Recursion - Recursion occurs when a method calls itself.
- Recursive Case - A recursive case is the part of the method that contains the recursion.
- Base Case - The base case is the part of the method that stops the recursion (and produces an answer I think).

Choose a reason for hiding this comment

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

re: (and produces an answer I think)

I've never thought about it like that, but I do think that's true.

- Activation Chain/Stack - The activation chain are a cascade of steps the recursive method goes through. (They are the 'bubbles' I drew out to get the answers below.)
- Activation Record/Call - The activation record is the memory area in the computer where local data for your current operation is stored.
- Infinite Recursion/Stack Overflow/Stack too deep - This is a recursion that goes on infinitely.
- Tail Recursion - (I know this was not covered, just read about it out of curiosity.) My guess from googling: it is a method that has its recursive component (i.e. the method) in the last line of the block.

Choose a reason for hiding this comment

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

Close - it's where the last recursive call produces an answer and then that answer is served "up" all the recursive calls without any additional computations.

@sudocrystal
Copy link

Recursion Tracing

Great "reasonings". I think I meant to see "bubbles" as your reasoning, but your way works and made sense :)

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.

1 participant