You are on page 1of 3

1. In Amazon I got out after written round . 2.

MicroSoft : Tech 1 : Q1 : How to store a binary tree in a file & then read back . Then in depth of this question . I used this method : Say BT is : A / B / \ C

\ D E My representation was : (A(B(D),(E)),(C)) Then in depth of this question . What if you hav ( , , characters in data of tree node . Write function to store BT . Write test cases for your code .Atleast 20 . Tech 2 : Q1 : Print leaders in an array . Leader element in an array is defined as it dont have element greater than itself in right of it . e.g. : 3 23 5 5 6 3 1 o/p is : 23 ,6 , 3 Q2 : Write a program to find the minimum spanning tree in graph. Graph is defined as : Edge : E(I,j) = 1 if |i-j| <= 6 = 0 otherwise

Tech 3 : Q1 : Which question you have asked till now . I told him about MST question and then he grabbed me . He asked how did you do the MST question I explained him full approach I used .such as Matrix representation , graphical represatation . Q2 : How will you store data for the following situation . Situation is : There is an organisation in which some person it borrowing and lending money from each others . I told him the DBMS table representation

Person_Id

Person_name

Store Borrowing as : Borrowed_From_id

Borrower_id

Then he asked about why didnt you used this representation to solve your previous MST question . Then I told every efficient representation of graph but he didnt agree on any one of them .

3 . Direct-I Tech 1 : Q1 : How will you store dictionary . Q2 : Implement LIFO which also tells minimum in O(1) . Operation are : 1. Insert element 2. Remove oldest element 3. Return minimum 4. Oracle Tech 1 : Q1 : Sort a binary tree . Space is not any concern . Q2 : Write a query which add an extra column in existing table emp . Q3 : After writing above query , A table dept is created from table emp . Create table dept as Select * from emp ; Q4 : What is dept table . is it the table emp before alter query or altered table . Q 5 : If we close the DB after writing an update query and then restart DB and accessing the same data which was updated .Which value will be accessed updated or before updation . Q 6 : Difference b/w DML & DDL . Q 7 : One aptitude question . Q 8 : Print string in reverse order using only one pointer . Tech 2 : Two puzzles : 1 . One person went to the cashier for taking x rupees & y paisa . Then he spent 20 paisa and Then he observed that he has money exactly double the money he want to take from cashier . 2 . There are 8 coins in a bag . 3 coin weights x kg

3 coins weights y kg 2 coins weights z kg 2 coins weights w kg You have to separate them into separate heaps according to their weights .

You might also like