Skip to content

Tag Archives: combionatrics

Given a number x, print all possible non-increasing sequences with sum equals to x. Examples:  Input: x = 3 Output: 1 1 1 2 1… Read More
The problem is to print all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More
Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers.  Examples:  Input: n = 2 Output: 2… Read More
Given a set of characters and a positive integer k, print all possible strings of length k that can be formed from the given set.… Read More
Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then the… Read More

Start Your Coding Journey Now!