array of integers
- From: "Kemal Oral CANSIZLAR" <ocansizlar@xxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 15:28:03 -0700
Hi all,
There is this question that is intriguing me. This is no homework or alike,
I have just come across and would really like to have some hints on how to
attack the problem.
There is an array of integers, without any restriction. How can I come up
with an algorithm to find all combinations of elements that add up to the
numbers in the array. If array is {1, 3, 2, 5, 4}, result would be {1, 2} =
3 is in array; {1, 3} = 4 is in array; {2, 3} = 5 is in array; {1, 4} = 5 is
in array.
I look forward to any inputs, thank you,
-Kemal.
.
- Follow-Ups:
- Re: array of integers
- From: Thad Smith
- Re: array of integers
- From: Arthur J. O'Dwyer
- Re: array of integers
- From: CBFalconer
- Re: array of integers
- Prev by Date: Re: Writing a character to the beginning of the same file
- Next by Date: Simulate user interaction - Avoid screen saver activation
- Previous by thread: Re: Can anyone answer this one?
- Next by thread: Re: array of integers
- Index(es):
Relevant Pages
|