You will not be able to get the correct solution with this algo becoz
ur algo will not able to generate all the 3 triplets sum.

You hav to loop through all the triplets ...

take for example the numbers :-

1 2 3 5 6..

Ur algo will generate the following triplet sum as

9 10 12 8 6 11 13 10 14 ...  The mistake is that one more triplet sum
9 is missing .  [ Triplet possible = { 5c3 = 10 }   != 9  ]

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to