Archive of articles classified as' "powerset"

Back home

powerset by recursion (a real example)


here, you are given “N” number of digits, and you were to calculate if you can add up a certain number with combinations of those given numbers.

here is the input example –


The total number of test cases are 3. Followed by the TC number, two numeric numbers are given – the expected add-up number, and the total number of digits.

If you are able to reach the expected add-up number with given numbers, then print the total cases, otherwise you could print “0” if you cannot make up that number.


Read the rest of this article »

No Comments