Its simple varition of 3 sum problem , using hask table u can easily do it .

let s=a+b+c+d can be written as
        b+c+d=s-a;   ->  3 SUM

Try it & let me know i find any difficulty :)


On Fri, Jun 15, 2012 at 3:50 PM, Akshat Sapra <[email protected]> wrote:

> Given an array *S* of *n* integers, are there elements *a*, *b*, *c*, and
> *d* in *S* such that *a* + *b* + *c* + *d* = target? Find all unique
> quadruplets in the array which gives the sum of target.
>
> --
>
>
> Akshat Sapra
> Under Graduation(B.Tech)
> IIIT-Allahabad(Amethi Campus)
> *--------------------------------------*
> [email protected]
> [email protected]
> rit20009008@ <[email protected]>iiita.ac.in
>
> --
> 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.
>



-- 
*Thanks
Shashank Mani Narayan
Computer Science & Engineering
Birla Institute of Technology,Mesra
** Founder Cracking The Code Lab  "http://shashank7s.blogspot.com/";
FB Page http://www.facebook.com/pages/Cracking-The-Code/148241881919895
Google+ http://gplus.to/wgpshashank
Twitter "https://twitter.com/wgpshashank<https://twitter.com/#%21/wgpshashank>
"
Puzzled Guy @ "http://ashutosh7s.blogspot.com"**
**FB Page http://www.facebook.com/Puzzles.For.Puzzled.Minds*
* Key Person Algogeek "https://groups.google.com/forum/#!forum
/algogeeks<https://groups.google.com/forum/#%21forum/algogeeks>
"
**Cell +91-9740852296
*


*
**
*

-- 
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