Examples usages of recursion
14 August 2022 (Updated 12 March 2023)
Example 1: Recursively count the number of elements in an array
This is a solution to this kata.
Example 2: Manipulate function argument until some condition is true
This is a solution to this kata:
So, your task is to sum up all the digits in string, possibly multiple times, till you get a one digit result. You should then return it as a string. The input will be always valid.
Example 3
Solution to this kata. I need to elaborate on how this works.
Example 4
Solution to this kata:
Tagged:
Snippets
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment