(sorry for my english) I need find best price of products packages. Example items packages and prices:
A=12
B=2
C=5
D=11
A+B=11
C+B=4
etc..
Now customer buy A,B,C. How can i find best combination price? For example brute force:
(A+B)+(c) = (11)+(5) = 16 or
(A)+(B)+(C) = (12)+(2)+(5)=18 or
(A)+(B+C) = (12)+(4)=16
.enter code here
.
.
etc. How find best prices combination?
I tryed bruteforce and it workd but it was very slow.