[algogeeks] Re: Given Infinite array ,Find one number problem

2007-05-07 Thread arun kumar manickan
On 5/7/07, Nisha Subramanian < [EMAIL PROTECTED]> wrote: > > Okie... if not O(n) how can u solve it in min order ..at any cost it > shouldn't turn out to be an infinite order.Is their any way Now? > > On 5/7/07, arun kumar manickan <[EMAIL PROTECTED]> wrote: > >

[algogeeks] Re: Given Infinite array ,Find one number problem

2007-05-06 Thread arun kumar manickan
we can use a modified binary search to find the element. whenever u calculate a new lower and upper boundary you can move them forward and backward respectively so that both point to a index which contains a valid number.But still this wont give O(n). do we have any memory constraints? do we have

[algogeeks] Re: Arranging arrays in to two sets.

2006-11-14 Thread arun kumar manickan
interesting solution really.   but the order of the algorithm seems to be n^2 / 4 . [ as we will look at n/2 elements each time and swap them, and repeating this for n/2 times ]   please correct me if I am wrong.   thanks. --~--~-~--~~~---~--~~  You received this me

[algogeeks] Re: Least Lost Selection Problem

2006-11-10 Thread arun kumar manickan
my idea,   say, fruit1 is required to make person A and person B happy.   person A requires num1 number of fruit1 and person B requires num2 number of fruit1.   then required number of fruit1 is max( num1 , num2 )   similary if you can extend this to all who require it and calculate the max require

[algogeeks] Re: whether 2 lists produce identical BST's or not?

2006-11-02 Thread arun kumar manickan
Hi,     We can make the following observations : 1) Both arrays A and B should have same no of elements 2) First element of both A and B should be the same 3) All elements less than the first element in array A should come in the same order in array B also. 4) All elements less than the second elem

[algogeeks] Re: Binary Tree - Depth First Search

2006-10-27 Thread arun kumar manickan
DFS on a BST = it pre order traversal ..   is this correct ? --~--~-~--~~~---~--~~ 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 fro