I was asked these questions for Microsoft, but they were for intern, not placement.There were a total of 4 rounds:
1)given a linked list with 1 data field(int), 1 pointer field to the next node of the list and 1 more pointer field with a pointer to some random node in the list.You have to make a clone of this list.
2)this is a qn on code chef. It is there in medium difficulty practice :The next palindrome
3)You are given an array of objects.each object has a property called color eg red, green,etc. there are a maximum of 3 colors in the array. give an in place and 1 pass algorithm to sort this array. i.e. all objects of same color should be together. qn2) write a program to swap adjacent nodes of a linked list. eg 1 with 2, 3 with 4,…
4)qn1) what is the maximum no of addresses possible in a 32bit system. qn2) given a 2D array of characters, find a particular word in the array. condition: next letter can either be left,right,top or bottom of the current letter.
Special emphasis is there on generating test cases to test your code.No questions on graphs or tress but you are expected to solve all questions in expected time and space complexity. good luck