Recursion is the process of repeating items in a self-similar way
For example 7! equals 7*6*5*4*3*2*1
public int factorial(int n)
{ if (n <= 1) return 1; else return n * factorial(n-1); }
Tail Recursion
Tail call OptimizationTo inform, empower, and entertain - 'jdksolutions' is here as a resource for people who are curious about the world of technology around them. Novices and experts are welcome to explore our ever-growing list of resources. Our contributors are full of passion. We will do our best to keep you informed on a daily basis.
-Admin-
{ if (n <= 1) return 1; else return n * factorial(n-1); }
Tail Recursion
Tail call OptimizationS = Single Responsibility Principle
O = Opened Closed Principle
L = Liscov Substitution Principle
I = Interface Segregation Principle
D = Dependency Inversion Principle