"Microsoft" - Question Bank For All

MICROSOFT

TECHNICAL Interview Questions

Given a singly linked list, in which the last node points to the middle node, delete the middle node and remove the loop.

 

Write a recursive function to form a list containing intersection of two given linked list without creating new nodes.

 

Given an array of size n, find the majority element. Majority element is one which gets repeated for more than n/2 times.

 

What are the features of a good code?

 

Find syntactical and logical errors in a C-program (printed on a paper).

 

Design a poke feature in Facebook

 

Given two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be made with its own memory — the original lists should not be changed.

 

Given an expression string exp, write a program to examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[“,”]” are correct in exp. For example, the program should print true for exp = “[()]{}{[()()]()}” and false for exp = “[(])”

 

Declare a character stack S.
Now traverse the expression string expression:

If the current character is a starting bracket (‘(‘ or ‘{‘ or ‘[‘) then push it to stack.
If the current character is a closing bracket (‘)’ or ‘}’ or ‘]’) then pop from stack and if the popped character is the matching starting bracket then fine else parenthesis are not balanced.

 

Tell the pseudo code to reverse a linked list.

 

You have a matrix a[m] [n]. Transpose it into a matrix b[n] [m] in minimum iterations. I could think of m*n/4 at most.

 

Difference between OOPS and C.

Write a function to check whether the string is valid or not.

Given a string and two positions in that string, shuffle the string, that is, move the given substring to the front. Example: Input: abcdefgh, 4,6 Output: defabcgh
This has to be done in place with O(n) time complexity.

 

How to implement dictionary data structure in C++? What kind of hash functions shall we use? How to manage collisions?

How would you implement vector data structure in C++ on your own? What would be the accessing time complexity? How can you make it O(1)? How to resize the structure?

How would I decide which feature should be implemented next in an operating system?

 

Given the head of two linked lists, find the merging point of both the linked lists. In case the linked lists do not merge then return NULL.

Given a 2d array of 0s and 1s where 0s represent water and 1s represent land. A connected patch of 0s count as one single water body and if a water body is covered by 1s all around it then it forms one pool. Write a function to return the total number of pools in the 2D matrix. In case a water body is present on the boundary of the array immediately return -1.

Given an address of a node in a singly linked list, delete that node.

Find the nth node from the end of a singly linked list.

Check whether a binary tree is a BST.

 

HR Interview

Tell us about your project.

What are the disadvantages that Gmail has? Can you suggest some means to overcome it?

How would you rate your academic performance in your graduation? Justify?

Why do you want to work and not pursue a higher education?

What would you like to improve in yourself 3 years from now (other than knowledge)?

What are your strengths and weaknesses?

Why Microsoft? What competitor of the company would you like to work for? Would you prefer Microsoft?

How can you assure that you will join by that time?

What are your strengths and weaknesses?

Why did you choose a career in Computer Science Engineering? Was it your own decision or parent's choice?

Describe any innovative aspects of your final year project.

Who is the CEO of Microsoft?

Do you have any questions for us?

Tell us about your strengths. Why should we prefer you to other candidates?

What have you done to improve your academic position in the last 2 years?

Tell us about any challenging tasks that you faced in your life.

According to you, which profile in our organization matches your skills?

Tell us about the company and its positioning as compared to its competitors?

What makes you stand out against all the other candidates?

Where would you like to work: software developing or software testing?

Why do you want to work at our company?

Why should we prefer you to other candidates?

Where do you see yourself in the next five years?

Tell us about your ultimate goal in life.

Discuss the most stressful situation you’ve faced in college life.

You had to wait for more than 5 hours for the interview. Are you feeling tired?

Tell me how was your online test?

What is your father’s occupation? What is his job location?

Who is your idol? What have you incorporated in your life from him/her?

Do you live in a hostel or at home?

How would you describe your college life?

Mention a person who is your idol in life.


Comments