Sum Combinations
Lesson 10 of 15 in Coddy's Recursion Challenges - Master The Recursive Thinking course.
Challenge
MediumWrite a function named printCombinations that gets an integer num and prints all the possible combinations of numbers from 1 to n having sum n.
Make sure to print the combinations in specific order and way, check the test cases!
The printing can be done in a recursive way, if it's not happening in the main recursive function.
Try it yourself
#include <stdio.h>
void printCombinations(int num) {
// Write code here
}All lessons in Recursion Challenges - Master The Recursive Thinking
2Medium Challenges
Knapsack ProblemNumber of SquaresInterleaving ResultSum CombinationsFind TripletSplit Array