combination sums

I have a set price within an array, I have to find the best combination of them, which do not exceed a certain amount. Can you give me a hand.
If I got your question right, then sort the array and take the minimum n elements. r
Topic archived. No new replies allowed.