Re: [algogeeks] Amazon interview Questions

2013-06-09 Thread sourabh jain
Hi ravi , I think he is trying to find the longest possible increasing chain in matrix . he needs to start traversing from first row choosing columns one by one and move in all direction. but he needs to maintain the already visited nodes. On Thu, Jun 6, 2013 at 12:07 AM, sourabh jain wrote: >

Re: [algogeeks] Amazon interview Questions

2013-06-09 Thread sourabh jain
Round 1 : Q2: given BST is not correct. correct BST passing this condition will be 7 / 5 /

Re: [algogeeks] Amazon interview Questions

2013-06-05 Thread Ravi Ranjan
Can u clear Round3 --- Qstn-3. the language is not cleared On Wed, Jun 5, 2013 at 1:52 PM, sourabh jain wrote: > Round 1: > 1.Design a Data Structure supporting 3 queries a)push b)pop c) find > minimum > Ans : Do it using Two Stacks . in first stack use it as normal stack. > second stack use it

Re: [algogeeks] Amazon interview Questions

2013-06-05 Thread sourabh jain
Round 1: 1.Design a Data Structure supporting 3 queries a)push b)pop c) find minimum Ans : Do it using Two Stacks . in first stack use it as normal stack. second stack use it to find minimun as the value inserted is greater than the top ignore it else push it. if pop operation happens and the value

Re: [algogeeks] Amazon interview Questions

2013-06-03 Thread *$*
these are for which position? and experience? On Thu, May 2, 2013 at 9:27 PM, Guneesh wrote: > Round 1: > 1.Design a Data Structure supporting 3 queries a)push b)pop c) find > minimum > 2.Given post order of a BST find whether each node of the tree(except > leaf) has only 1 child or not. >e

Re: [algogeeks] Amazon interview Questions

2013-06-03 Thread bharat b
Can any one give some points on Round 3 : 1st and 3rd question ? On Thu, May 2, 2013 at 9:27 PM, Guneesh wrote: > Round 1: > 1.Design a Data Structure supporting 3 queries a)push b)pop c) find > minimum > 2.Given post order of a BST find whether each node of the tree(except > leaf) has only 1 ch

[algogeeks] Amazon interview Questions

2013-05-02 Thread Guneesh
Round 1: 1.Design a Data Structure supporting 3 queries a)push b)pop c) find minimum 2.Given post order of a BST find whether each node of the tree(except leaf) has only 1 child or not. eg5 \ 7 / 3 / 2 is correct as e

[algogeeks] Amazon Interview Questions

2013-02-12 Thread Pratik Mehta
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?] * *

Re: [algogeeks] amazon interview questions

2012-06-03 Thread Hassan Monfared
bool IsValid(string s) { for(int len=0;len wrote: > can be done with O(n^2) time complexity.. > > can it be done with O(n) complexity ??? > > On 6/3/12, utsav sharma wrote: > > given a string tell wether it is valid or not. > > string is valid if there is no substring which have the same substri

Re: [algogeeks] amazon interview questions

2012-06-03 Thread Jeevitesh
Can be done in O(n) time complexity using Suffix Trees. On Sun, Jun 3, 2012 at 1:52 PM, atul anand wrote: > can be done with O(n^2) time complexity.. > > can it be done with O(n) complexity ??? > > On 6/3/12, utsav sharma wrote: > > given a string tell wether it is valid or not. > > string is

Re: [algogeeks] amazon interview questions

2012-06-03 Thread atul anand
can be done with O(n^2) time complexity.. can it be done with O(n) complexity ??? On 6/3/12, utsav sharma wrote: > given a string tell wether it is valid or not. > string is valid if there is no substring which have the same substring > following it. > > these strings are not valid:- "stringstri

[algogeeks] amazon interview questions

2012-06-02 Thread utsav sharma
given a string tell wether it is valid or not. string is valid if there is no substring which have the same substring following it. these strings are not valid:- "stringstring","geek123123rt", "abcadabcad","strngstingstrngsting" -- You received this message because you are subscribed to the Goog