Showing posts with label fresher microsoft interview. Show all posts
Showing posts with label fresher microsoft interview. Show all posts

Wikipedia Microsoft Interview questions Collection

Wikipedia Microsoft Interview questions Collection
Surprised to see below are interview questions of Microsoft collected by Wikipedia
*Design a cellphone for a blind person.
* Design a music system for a car. What are the features? Draw a picture.
* Design a GPS navigation unit for a hiker
* Design a communication device for Canadian park rangers.
* Design a remote control for an automatic window-blind system.
* Design TV Remote Control with Two Buttons.
* Design a coffee maker that will be used by astronauts.
* Design an alarm clock.
* Design an alarm clock for a blind person.
* Design a search function
* Design a website for a library
* What method would you use to look up a word in a dictionary?
* What are examples of poorly designed software?
* Design an instant messaging system.
* I am your grandmother. Describe what MATLAB is to me.
* How would you explain what a database is to a 5-year-old?
* How would you explain computer networking to a kindergarten kid?
* What is your favorite software, and how would you improve it?
* Write code for an electronic messaging board. What happens when a user logs on?
* Develop an algorithm for selecting objects in Visio.
* Tell me about a time when you made a decision and later found out that it was incorrect. What did you do to resolve the issue?
* Suppose you are one week away from the product shipping date and discover a bug in your software. What do you do?
* You have a linked list and don't know how long it is; how do you find the middle of it?
* How would you test a keyboard?
* How would you test a pen?
* Write code for finding a duplicate in an array.
* Write code that returns the length of a string without using any built-in functions.
* Reverse a Singly Linked List with and without using Recursion.
* Determine if a Binary Search Tree is well formed.
* Reverse every word in a String (abc def becomes cba fed).
* What method would you use to look up a word in a dictionary?
* Write a function that returns the angle between the hour and the minute hands of a clock, given input of the time.
* Write a function that takes a string consisting of numeral characters and returns all possible alpha character strings of same length as input that correspond to the keypad of a typical telephone.
* Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?
* How would you test an elevator?
* How would you test a vending machine?
* How would you test a program that takes in two points and outputs the distance between the two points?
* Test the Windows scroll bar.
* Switch every pair of words in a string ("ab cd ef gh" becomes "cd ab gh ef")
* Write the function for strstr function (finding a substring inside a string)
* Reverse the order of words in a string ("ab cd ef gh" becomes "gh ef cd ab")
* Write the function for string comparison. How would you test it?
* Write a function to zero all duplicate values in an integer array. How would you test it?
* Write a function that compares two strings and returns a third string containing only the letters that appear in both.

Microsoft Interview Questions and answers

Fresher Microsoft Interview Questions and answers
Written Test:
1. A program was given and we were asked to debug the code so that it works as desired. The program's aim was "finding the meeting point of two linked lists". It was quite simple and some of errors were like in allocating memory, some logical errors. But its doable.
2. Given a Circuit (with resistors), we need to calculate the total resistance. Input will be like AB-5ohm, BC-6ohm, BC-10ohm, BC-20 ohm, CD-5 ohm. BC has been repeated twice implying they are in series. "Write a program by implementing efficient data structure for storing and calculating the total resistance". I used stack using linked list and implemented which works for almost all combinations of circuits (but didnt work for some :D).
3. "Write test cases for reversing words of string ". For eg. "This is nice" is input string and output is "nice is This". We need to write test cases for this program,(not the program for it). Writing some 5 to 10 will do. Start from some of the very simple cases like for eg. "Check whether the program in accepting input".
4. You have been asked to write features of an "Universal Remote Controller". Eg. "It will support TV,System, DTH etc".
The interviews in MS will be a loop process where a person has to attend interviews in a loop(every interviewer will interview us once). We need to satisfy all the four to get into MS.
Round 1:
1. What were your challenging projects? I named one and I was asked to write test cases for that. Interviewer was not satisfied until I gave around 10 test cases.
2.Deletion of a node in linked list.. seems pretty simple , he was expecting a code with good coding standards. From there discussion went upto locks and mutexes in OS.
3.Print a Random word from a file. Input is "path to a file", constraints- No extra memory like hashing etc. All the words in the file should have equal probability.
4.Rectangles overlapping questions, write test cases.(I had seen this already). This is a popular MS question.
Round 2:(only one question)
1.Write c++ working code for Given a large number with many digits, propose a method or data structure to efficiently store them. Addition, subtraction, mult, division should be supported by your design.
 Round 3:
Given a matrix, we need to transform it in such a way that if an element is zero, we need to zero out the contents of corresponding row and column(of that element). Only minimal extra space allowed, test cases was also asked. I gave some solutions,but he didnt get satisfied as the I used more space than what he asked.
eg. if the matrix is
1 1 1
1 1 1
1 1 0
the output matrix is
1 1 0
1 1 0
0 0 0.