Re: [algogeeks] Directi Interview Ques
@abinesh: The solution given has a very very high complexity. as it finds all possiblilities and tests each one of it. is it *n*[(2n!)/(n! * n!)]* --> This is exponential solution. I am not sure but, there must be a DP solution to this . --Sravan Reddy On Wed, Jul 11, 2012 at 12:15 AM, arumuga abinesh wrote: > http://www.geeksforgeeks.org/archives/17743 > > Using the above problem we get all possible merges , at each possible > merge, we can calculate the sum. > > On 7/11/12, Mr.B wrote: > > I think you missed the question: > > Its a stable merge. (order of elements in each array should be same) > > Sorting will destroy the original order. > > > > Thanks, > > Mr.B > > [Please include complexities and pseudo-code] > > > > On Tuesday, 10 July 2012 16:18:04 UTC-4, Akshat wrote: > >> > >> Here you have to first sort both the arrays A and B and merge both the > >> arrays to form the sorted array C > >> > >> -- > >> > >> > >> Akshat Sapra > >> Under Graduation(B.Tech) > >> IIIT-Allahabad(Amethi Campus) > >> *--* > >> sapraaks...@gmail.com > >> akshatsapr...@gmail.com > >> rit20009008@ iiita.ac.in > >> > > > > -- > > 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/-/uCRLEzDBWAAJ. > > 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: candies - interviewstreet -- how to go about solving this problem
for your example 5 4 3 2 1 5 4 3 2 1 -- candies assignement. (since the length of the longest decreasing sequence is 4, and length of increasing seq. before it is 0. its max(0+1,4)+1 = 5 --Sravan Reddy On Tue, Jul 10, 2012 at 8:09 AM, bala bharath wrote: > > can u explain ur algorithm for the sequence > > * > 5 4 3 2 1* > > -- > 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: Secure computation of Intersection of two sets
Again, the properties of hash function guarentees the preimage resistance, in the link. so, if given a hash, its difficult to find a message that has the provided hash. Also, yes.. with some probability. 1/(2^256) -- which is very very very less. (and can be considered to be 0, looking at the amount of data (hashvalues - message) a CPU can store or process. (computing so many hash values) Also, if we want to find the intersection without knowing the non-intersection keys. this is an approach. if we want to find the intersection without server knowing any client keys at all. third party is the only approach I can think of. --Sravan Reddy On Mon, Jul 9, 2012 at 11:36 AM, Sairam Ravu wrote: > But, the problem is the server may be having some data sets, and he > may hash to get some values, he will compare those with that of the > hash values given by the client. Then, he will come to know the > possible values which the client has sent with some probability > > -- > With love and regards, > Sairam Ravu > I M.Tech(CS) > Sri Sathya Sai Institute of Higher Learning > "To live life, you must think it, measure it, experiment with it, > dance it, paint it, draw it, and calculate it" > > -- > 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.