Results 1 to 2 of 2

Thread: help in logic

  1. #1
    Join Date
    Nov 2003
    Location
    India
    Posts
    114

    Unanswered: help in logic

    I have an array, which is having n numbers.
    {10,20,34,5,67,78,89,09,89,86,1,2,3,54,6,7,4,5,9,7 }

    I want to have all the combinations from this array which give me a predetermined sum.

    For e.g all combinations which add to 10 in this array can be

    5+5 ( As 5 occurs twice)
    3+7
    2+9
    1+2+3+4
    7+2+1

    Can you please give me some basic logic through which I can get this combination?

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    What does this question have to do with Oracle?
    The homework tutor is down the hall & the 2nd door on the left.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •