Professional Documents
Culture Documents
2a. given an input string, reverse it. length of string is not known.
b. test cases
the pages are in circular fasion ie if u do page up fromhe 1st page you reach nth page
time : approx 50 mins
round 2:
question 1:
given a set of problems which can either be solved by the linked lists or stacks or queues or arrays or a
combination of more than one of these...draw a venn diagram showing this s et of problems.
answer was a simple circle as all of the data stuctures can be implemented using the other. hence all the
portions overlaped completely.
question 2:
test cases for reversing the linked list...
time:around 45 mins
round 3:
question 1: why do u want to join ms??
question 2: if we ask you manager or mentor what do you think they would say about you??
question 3: write an algorithm to shullfe a pack of 52 cards..
question 4: what are the differences between an array and a linked list....
question 5: three baskets...with wrong lables of orange apple and mixed...a very common puzzle...i was
supposed to find the right labling by picking only one fruit from one of the baskets...
time: arnd 1 hr 10 mins
round4:(AA)
talked about the project for 20 mins...
then a simple question on arrays....input :aaabbbccddd
output:a3b3c2d3
input:abbccc
output:ab2c3
and then write test cases for the same....
time:arnd 49 mins
1). Suppose in a binary tree, you can get the parent node of every given node (say through a function
node *par_node (node *) ). Given a node of this tree, write a code to get the immediate right sibling of this
node. [No extra space to be used].
2). Write a function to rotate (left) a given integer array n number of times.
[No extra space].
3.A hash table is given.it is like linked list of keys and each key node has a data linklist associated with
it.No. of keys is N and bucket size is B. insert a node in it.
output:
1
23
45
6
PS:you have to change line after each level
5.for Y in linked list prob write a production quality codei.e assuming user can give all possible i/p eg.two
list that never meet,two circular lists
6.string reversal e.g
i/p: IP is mad
o/p: mad is IP.
7. stricmp() code
8.given pid and given two time t1 and t2 wap to give how many process are running since t1,died etc till t2
9.give time in hr and min tell the acute angle made by clock hands at that time (production quality code)
10. Y in linked list with loop at tail.... return the y junction
2. Write a program to find all permutations of a given smaller string in a larger string.
For e.g with n=2 valid combinations are (()) and ()()
1) Write a program to do this - Given a sentence "Hello I am IP", your program should convert it to "IP am
I Hello"
2) Tell the differences between Thread and Process
3) What is a threaded tree and why is it used ?
4) There is a software which takes as input three sides of a triangle a, b and c, and tel ls that which type of
triangle it is (eqilateral, isoceles etc). Write test cases for testing this program.
5) How do we multiply a number by 7 without actually multiplying it.
1) Given a tree, whose each node contains some numbers. Write a function which calculates the sum of
nodes at each level (returns array of sums)
2) Write test cases for above program
Selection As FTE
Interview 1 (after internship) - By Sanjay Nair
1) Tell me about your project during internship (this will definitely be asked)
2) Given a bag containing a few balls of any number of colours, write a program which selects a ball at
random, and organizes them in a sequence such that balls of same color appear together.
3) Write test cases for this above program.
After this I was informed that there will be some more interviews when Microsoft visits BIT
1) Given a tree, and a pointer to any one of the node, design an algorithm and find i) the just right sibling
of that node ii) all the right siblings of that node iii) all the siblings of that node (i.e. all the nodes at that
level) [This question is a bit complicated than what it looks - we have to take care of a lot of things while
designing the algorithm for this question - also the same algorithm can be used for solving all the parts of
question with little modification]
2) Write exhaustive test cases for the above
3) Write tests cases of program that reverses the sequence of words in a string. He wanted me to write
test cases such that it also checks the efficiency of program i.e. time, complexity etc
4) Asked about the internship project at Microsoft - what was the project, what did I do etc.
1) Write the best program which you will use to find whether there are duplicates in a string or not. The
program will stop once the first duplicate is located. Write test cases.
2) Find the third largest element in an array of numbers. Write test cases.
3) Design Microsoft Word for people who have very week eyesight.
4) Asked about my internship project - the same usual things.
1) How were your previous interviews. What do you think about them [this is a typical question to test
confidence - if this question is asked - assume that they were happy with your previous interviews]
2) What is your final year degree project [I explained him what my project aim was]
3) Design data structures for your final year degree project. [it became very very very complicated -
probably the toughest problem I have solved]
4) Design test cases for your final year project.
5) Write a program - given the coordinates of two rectangles (only upper left and lower right), find the
coordinates of the rectangle formed when the two given rectangles intersect.
6) Write automation test code for the above program.
7) Use the rectangle intersection program as an inverse to test itself.
8) Write test cases for rectangle intersection program.