FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Algo needed!





mayank_abhishek
Hi!

Can anyone help me with an algo to:

Find exactly K integers from a given array of N integers, where the sum of the K integers is equal to M. No integer can be chosen twice, all integers in the array are different.

I particularly want an algo for K = 3, which has an complexity O(N^2).

Please help!

TIA!
Related topics
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.