Answer Posted / Deepshikha Singh
Recursion is a method of solving problems where the solution depends on solutions to smaller instances of the same problem. Here's an example of factorial recursion in Scala: 'def factorial(n: Int): Int = if (n <= 1) 1 else n * factorial(n - 1)'.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers