Question 5

Write a function that takes two arguments one array of integers that ranges between 0 and 9 and second the target sum(again integer). It produces all permutations strings of the input digits that equals the target sum.
For example, if input is array 2, 3, 5 and target sum is 10, then the output should be:
22222 because 2+2+2+2+2 = ,10
2323 as 2+3+2+3 = 10
3232
55
2233
3322
532
235
352
etc.,

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close