Hello,
Can somebody help me with an algorithm or idea for this problem :
Given a non sorted data (positive integers), find all groups of elements with sum <= X, where X is given.
ex:[
[2 6 3 1]
X = 8
2+6, 2+3, 2+1, 2+3+1, 3+1, 6+1 ]
I need 3 solutions / algorithms, one that is time efficient, one memory efficient, and a trade-off between the two.
Appreciate any help.
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









