@swetha

I think you have missed the set {1,2,6} in your o/p.

On Sun, Aug 7, 2011 at 2:40 PM, swetha rahul <[email protected]>wrote:

> Given an array find all the set which form the given sum  in O(n)
>
> i/p: a[]={1,2,3,5,7,6,8,10}
> sum=9
>
> o/p should be {1,3,5} {2,7} {3,6},{1,8}
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

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

Reply via email to