Skip to content

Commit

Permalink
Update Recursion.md
Browse files Browse the repository at this point in the history
  • Loading branch information
memcmahon authored Jan 10, 2024
1 parent 0378997 commit 8c87e34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module6/lessons/Week5/Recursion.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Imagine you have been given the following code challenge in an interview:
Build a function that takes in a string, and returns that string reversed. EX: `input: "Megan", output: "nageM"`. You must adhere to the following constraints:
* You may not use _any_ LINQ methods
* You may not use `for`, `foreach`, or `while`
* The function must work for strings of any length\
* The function must work for strings of any length

Spend 5 minutes brainstorming what this function might look like.

Expand Down Expand Up @@ -63,7 +63,7 @@ public class Program

Make sure to identify the following characteristics of the method above - talk specifically about how the recursive instructions move us closer to the base case.

</section
</section>

This is a very simple example of recursion, but it does give us a chance to identify the key features of a recursive function. Every recursive function must have these two pieces:
1. A **base case**: a terminating scenario that _does not use recursion_ to produce an answer
Expand Down

0 comments on commit 8c87e34

Please sign in to comment.