Re: [algogeeks] Question

2013-02-17 Thread atul anand
related to this problem, link given below :-

http://groups.google.com/group/algogeeks/browse_thread/thread/7cfb0a6f7d121d92/0adc692fad1bab40?hl=enlnk=gstq=DP+equation+for+interval+problem#0adc692fad1bab40

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




[algogeeks] Re: Amazon Interview Questions

2013-02-17 Thread Tushar
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.




Re: [algogeeks] Question

2013-02-17 Thread Richard Reed
If the times are discrete, you can create an array with the size of
discrete time (0 to whatever, adjusted). For each time slot, add 1 to each
index of the array that corresponds to a time range. Then iterate through
the list to find the highest time tally. This is an O(n) solution.

On Sat, Feb 16, 2013 at 11:32 PM, shady sinv...@gmail.com wrote:

 Given a number of time slots – start time and end time,“a b”, find any
 specific time with the maximum number of overlapping.

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