Combination Calculation
Lesson 2 of 3 in Coddy's Interview Coding Challenges - X course.
Challenge
MediumWrite a recursive function named combination to calculate the combination C(n, k), which represents the number of ways to choose k items from n items without regard to order.
The combination formula is given by C(n, k) = n! / (k! * (n - k)!).
Try it yourself
int combination(int n, int k) {
// Write code here
}