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.
- Host: GitHub
- URL: https://github.com/jvillegasd/general-exercises
- Owner: jvillegasd
- Created: 2017-08-05T17:45:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-01T05:16:06.000Z (about 8 years ago)
- Last Synced: 2025-02-18T10:58:22.231Z (9 months ago)
- Topics: recursion-exercises, recursive
- Language: C#
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 .