Bifalgorithm post
This question is so easy, I'm gonna solve it with recursion. Given a string, print out each letter one at a time. So first, let's write the base case. If len word equals equals zero, then we're just gonna return and then we're just gonna print out the first letter of the word and then we just recurse. So we'll call the function and here we're gonna pass the word, but we're gonna remove the first letter and that's pretty much all the code. Let's hit submit. Let's go. Follow for more.
This question is so easy, I'm gonna solve it with recursion. Given a string, print out each letter one at a time. So first, let's write the base case. If len w…
Ideas in this flowchart
- Solving with Recursion
- Base Case
- Check if length of word is zero
- Return
- Recursive Case
- Print first letter of the word
- Recurse with remaining word