¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
find out count of all subsets such that the sum of all the numbers in the subset is equal to target number.
input : [1,2,3,4,5] target : 5 output : [1,4] [2,3] [5] help with to write the program for this question in c c++ c# java (any language from this). help needed please.
1 Respuesta
+ 7
Hi vivian
You can show your try(code) you made to solve this problem to get better help from community.
you need to generate all possible subsets(use of binary or a recursive program will be easy to think for it) & then look for sum of its elements.