i have few questions regarding ur problems pratik :

1) A tree with only parent pointer, how to find LCA?
Doubt : do u mean only root of the tree is given , i am assuming root along
with two nodes address whose lca need to
         find too is given , i am right ?

2) Find top k searched elements from a continuous stream of data.
Doubt : what do u mean by top k search element.... can u please explain
little bit with exmple.


I would love to post solution for you provided clear my doubts ....
may i knw which Amazon's round questions are they ?

On Mon, Feb 18, 2013 at 1:28 AM, Tushar <tushicom...@gmail.com> wrote:

> It looks as if you have just pasted some Amazon interview questions on
> this forum.
> These are pretty common questions.
> Try to come up with your own answers.
> Do some research on google and previous posts on this forum. You'll get
> answers to all of them.
>
> If you have some idea and want to discuss that, then post different posts
> for each questions as arun recommended along with your understanding of the
> question and your approach.
>
> All the best
>
>
> On Saturday, 9 February 2013 14:45:35 UTC+5:30, Pratik Mehta wrote:
>>
>> Hi All,
>> I need ur help in solving few questions.
>>
>> Would you please help me out *BY GIVING THE ALGORITHM AND THE LOGIC
>> BEHIND IT and it's DEEP EXPLANATION IF POSSIBLE?*
>>
>>
>> *
>> *
>>
>> *a. Kadane’s Algo.*
>>
>> *
>> *
>>
>> *b. Linked-list intersection point.*
>>
>> *
>> [A tree with only parent pointer, how to find LCA?]
>> *
>>
>> *
>>
>> *
>>
>> *
>> c. Design a stack which can perform findMax in O(1).
>> *
>>
>> *
>>
>> *
>>
>> *d. Set of stocks for each day have been given. Need to find the days on
>> which I buy and sell share to earn max profit, alongwith finding the max
>> profit.*
>>
>>
>> *
>> e. Find top k searched elements from a continuous stream of data.
>> *
>>
>> *
>>
>> *
>>
>> *f. Given a linked-list and 2 integers k & m. Reverse the linked-list
>> till k elements and then traverse till m elements and repeat.*
>>
>> *Write production quality code.*
>>
>> *
>> *
>>
>> *g. An array of elements have been given. Find for each element, first
>> max element to its right.*
>>
>> *
>> *
>>
>> *h. Boundary traversal of a tree. Write the code.*
>>
>>
>> Please help me out...
>>
>> Thanks in advance...
>>
>> Thanks & Regards,
>> Pratik Mayur Mehta.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to