An open API service indexing awesome lists of open source software.

https://github.com/jvillegasd/general-exercises

I will post here several recursion/general exercises that i will do.
https://github.com/jvillegasd/general-exercises

recursion-exercises recursive

Last synced: 8 months ago
JSON representation

I will post here several recursion/general exercises that i will do.

Awesome Lists containing this project

README

          

# General exercises
I will post here several exercises that i will do.

Problems:
1) Find n-th fibonacci value with a recursive function with one parameter.
2) With this formula i can know all the ways that i can choose "r" things in a "n" group: C = n! * (r! * (n - r)!), Find a recursive version of this formula and implement it.
3) Write a recursive function that sort an array from the lowest to the biggest element.
4) Write a recursive function that get the sum of the first "N" integers.
5) Write a recursive function that get the sum of pair integers from "N" to 2.
6) Write a recursive function that get the GCD (greatest common divisor) of "m" and "n" with Euclidean method. If m < n, the code will switch the variable.
7) Write a recursive function for convert a number to binary notation.
8) Write a recursive function for convert a binary number to base 10 number.
9) Write a recursive function for get the sum of all elements of an integer array.
10) Write a recursive function for invert an integer array.
11) Write a recursive function for know if a word it's palindrome.
12) Write a recursive function that print all possible decomposition of a number as sum of numbers smaller than itself, formulas: N=(n-1)+1 and N=(n-2)+2=(n-2)+1+1 .