Skip to content
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

Homework completed #23

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

Conversation

sahanamurthy
Copy link

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) Good!
Would you like help/follow up about recursion? Maybe? I think it couldn't hurt to get extra practice in some of those more complicated ones.

- Activation Record/Call
- An activation record/call is each little "bubble" within the activation chain. I take that to mean that an activation record occurs each time a recursive case occurs within an activation chain.

Choose a reason for hiding this comment

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

Correct.

- Tail Recursion
- Tail recursion occurs when the last computation within a method is a recursive call. All our recursive methods from the homework are examples of Tail recursion.

Choose a reason for hiding this comment

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

None of our examples in the homework are of Tail Recursion.

I didn't actually have time to cover tail recursion in class. I may in the future, but in this moment you don't need to know it.

Choose a reason for hiding this comment

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

WAIT! I LIEEEEEEEE! There is a tail recursive one. Namely: mystery3

- What is mystery3(-6)?
- stack level too deep (checked my answer and found out I had it wrong. Worked on it until I got the correct answer: 200)

Choose a reason for hiding this comment

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

:)

- _Added Fun: How could we make the reversal happen by letter, instead of by word (i.e. Make it so that mystery6("goodnight moon") returned "noom thgindoog")?_
- I am not sure. :(

Choose a reason for hiding this comment

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

That's fine. It was only a challenge question :)

# end
# return mystery6(s[(space+1)..-1]) + " " + s[0...space]
# end
# end

Choose a reason for hiding this comment

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

I'm unsure if you did anything to this file or not. Github is confusing me. :/

@sudocrystal
Copy link

Recursion Tracing

nice job

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