Re: [algogeeks] 4Sum
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 sapraaks...@gmail.com 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) *--* sapraaks...@gmail.com akshatsapr...@gmail.com rit20009008@ rit20009...@gmail.comiiita.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 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. -- *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/wgpshashankhttps://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 /algogeekshttps://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 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.
Re: [algogeeks] Adobe interiew question
yes u can review that link :) On Tue, Jun 12, 2012 at 9:47 PM, Anika Jain anika.jai...@gmail.com wrote: how can we implement exception handling in c? -- Regards Anika Jain -- 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. -- *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/wgpshashankhttps://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 /algogeekshttps://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 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.
Re: [algogeeks] Re: Maximal possible subsets Algorithm
@piyuesh 3-Sum is not exponential ? its quadratic , check wiki for refrence ? On Mon, Dec 5, 2011 at 5:36 PM, Piyush Grover piyush4u.iit...@gmail.comwrote: As I mentioned earlier solution with exponential time-complexity is the obvious one. Is there any way to solve this problem by greedy/Dynamic algo? On Mon, Dec 5, 2011 at 5:24 PM, WgpShashank shashank7andr...@gmail.comwrote: @piyuesh , Saurabh isn't 3-Sum Suffics Here ? Another thought problem can also be thought by generating power set of given set e.g. if set has n elemnts its power set has 2^n elements , then finds the set that has sum up yo given weight isn't it ? hope you know how to find power set efficiently ? correct if is missed anything ? Thanks Shashank Computer Science BIT Mesra http://www.facebook.com/wgpshashank http://shashank7s.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/a9F-gPQkjm0J. 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. -- 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. * ** * -- 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.
Re: [algogeeks] Re: Jumping Puzzle
HI Rohit, Although i haven't checked test many cases also I am not saying algo is wrong but DP will always Gives us Optimal Solution, even for large data-set,but Greedy Will Fail in That Case.I was aware of the same Greedy Algo/Code That you posted but found DP Will Excite Interviewer :) Regards Shashank Mani Computer Science Is Awesome So Why I Write Code Computer Science Birla institute of Technology Mesra On Sat, Aug 13, 2011 at 11:08 PM, rohit jangid rohit.nsi...@gmail.comwrote: ok check this, https://ideone.com/hZboG there may be bugs in coding, but I'm quite sure that algo is correct need to check more cases though but working on all the cases discussed here is there any proof that greedy won't work in this case? On Sat, Aug 13, 2011 at 11:03 PM, rohit jangid rohit.nsi...@gmail.com wrote: found some bugs , will repost it On Sat, Aug 13, 2011 at 10:55 PM, rohit jangid rohit.nsi...@gmail.com wrote: I can only say that above code is wrong, check this code of mine, I have tested more cases and all are working, https://ideone.com/pEBs8 see if you can find any bug in this one . thanks. On Sat, Aug 13, 2011 at 8:03 PM, WgpShashank shashank7andr...@gmail.com wrote: @rohit , I think we will get some cases where greedy won't work check out its giving 3 jumps still https://ideone.com/6UWW1 checked in hurray , if anything wrong do send me over gmail ? Regards Shashank Mani Computer Science Is Awesome So Why I Write Code Computer Science Birla institute of Technology Mesra -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/Rerf5mzR7XcJ. 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. -- Rohit Jangid Under Graduate Student, Deptt. of Computer Engineering NSIT, Delhi University, India -- Rohit Jangid Under Graduate Student, Deptt. of Computer Engineering NSIT, Delhi University, India -- Rohit Jangid Under Graduate Student, Deptt. of Computer Engineering NSIT, Delhi University, India -- 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. -- 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.