-
Notifications
You must be signed in to change notification settings - Fork 32
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
Updated Readme with answers #33
base: master
Are you sure you want to change the base?
Conversation
- Infinite Recursion/Stack Overflow/Stack too deep | ||
- Tail Recursion | ||
- Recursion - **The use of a method/application inside itself** | ||
- Recursive Case - **A problem that is divided into smaller problems** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct.
A recursive case is the case in which the method actually calls itself.
- Tail Recursion | ||
- Recursion - **The use of a method/application inside itself** | ||
- Recursive Case - **A problem that is divided into smaller problems** | ||
- Base Case - **An immediately solvable problem** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. Where the method knows the answer without recursing.
- Base Case - **An immediately solvable problem** | ||
- Activation Chain/Stack - **All of the iterations of the method being called within itself** | ||
- Activation Record/Call - **A single instance/iteration point of the method being called within itself** | ||
- Infinite Recursion/Stack Overflow/Stack too deep - **An error that occurs when the method results in an infinite loop** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say "error". It's a situation where the method results in an excessive use of memory that is usually caused by an infinite loop of sorts with many many calls to the recursive method.
- What is mystery5("")? | ||
- What is mystery5("Hi, there!")? | ||
- What is mystery5("hi")? ** | ||
- What is mystery5("")? **blank** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should always put things that return a String in double quotes. For this answer, the answer should be "" (empty String) but saying "blank" is confusing.
- What is mystery6("Hi, there!")? | ||
- What is mystery6("goodnight moon")? **moon goodnight** | ||
- What is mystery6("Ada Developers Academy")?**Academy Developers Ada** | ||
- What is mystery6("Hi, there **there! Hi,** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but notable: there should be a leading space on each of these " moon goodnight", " Academy Developers Ada", " there! Hi,"
Recursion TracingA little feedback, but looks good! |
Recursion Tracing
Thanks for doing some brain yoga. You are now submitting this assignment!
Comprehension Questions