Skip to content

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

Notifications You must be signed in to change notification settings

jvillegasd/General-Exercises

Repository files navigation

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 .

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages