Re: [algogeeks] google paper

2012-08-12 Thread a g
1. Print the zig-zag traversal of a BST. 2. There is a language Googley. There are two global registers X and Y both of whom have the character 'A' stored in them. There are only two commands in the language. i) next ii) print next increments the character in the X register. After reaching 'Z', ag

Re: [algogeeks] Microsoft online questions

2012-07-31 Thread a g
Q1 ) rotate image by 90 degree Q2 ) sort a list with 0,1,2, values by pointer manipulation Q3) 2 values in bst swapped correct the bst On Tue, Jul 31, 2012 at 12:30 AM, Purani Sekar wrote: > Analytical questions were from logical reasoning, syllogism, piechart, etc. > Technical questions were li

Re: [algogeeks] Re: Microsoft online questions : DLL to bst??

2012-07-31 Thread a g
check on geeksforgeeks.org On Tue, Jul 31, 2012 at 3:09 PM, Ashish Goel wrote: > how would you do "convert sorted doubly linked list to bst using same > nodes as in DLL" > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > On Sun, Jul 29,

Re: [algogeeks] Re: Directi Interview Ques

2012-07-21 Thread a g
@ anshu - should it not be like this : f( x(i, n), y(j, n) ,0) = max( { x[i] * x[i+1] + max ( f( x(i+2, n), y(j, n), 0) , f( x(i+2, n), y(j, n), 1) ) }, { x[i] * y[j] + max ( f( x(i+1, n), y(j+1, n), 1 ), f( x(i+1, n), y(j +1, n), 0 ) } ); On Mon, Jul 16, 2012 at 2:15 AM, Anshu Mishra wrot

Re: [algogeeks] Amazon Interview Question

2012-07-04 Thread a g
1 2 3 is not a BST and its pre-order traversal is 1 2 3, pre order of other is 3 2 1 . On Wed, Jul 4, 2012 at 5:17 PM, Bhupendra Dubey wrote: > Consider trees: > > 1 3 >2 3 2 >