Sunday, May 20, 2007

Microsoft Interview Questions

http://en.wikipedia.org/wiki/Microsoft_interview (5/21/07)
----------------------------------------------------------

Interview questions

The questions asked during the Microsoft Interview are crafted to determine how a candidate solves a problem. They are designed to evaluate a candidate's coding and design abilities. When answering design questions it is important for the candidate to be able to think about how the technology might be used both now and in the future. User scenarios are extremely important to consider. Some questions involve relating design questions with technical discussions of projects that the candidate has worked on in the past. The Microsoft Interview is intended to seek out creative thinkers and those who can adapt their solutions to rapidly changing and dynamic scenarios. Below is a small sample of questions that a candidate might be asked to answer during the second-round interview:

* Design a music system for a car. What are the features? Draw a picture

* Design a communication device for Canadian park rangers

eh?

* Design a remote control for an automatic window-blind system

* Design a coffee maker that will be used by astronauts

Something involving a sealed environment with the concept of a french press pressing down upon the ground beans to extract the results.

* What are examples of poorly designed software?

Windows XP SP1, ME...

* Design an instant messaging system

* I am your grandmother. Describe what Matlab is to me

For my Danish grandmother:

MATLAB er et matematik-program som fokuserer på anvendelsen af matricer og vektorer. Deraf navnet MATrix LABoratory. Programmet så dagens lys sidst i 1970'erne, og på daværende tidspunkt var Cleve Moler hovedophavsmanden bag dette program. Foruden numeriske beregninger er det også muligt at lave grafer (plots) og grafiske bruger-interface.

MATLAB er et af de hyppigst anvendte matematik-programmer blandt ingeniører, og i Danmark bliver det blandt andet anvendt på Danmarks Tekniske Universitet.

For my Colombian grandmother:

MATLAB es la abreviatura de Matrix Laboratory (laboratorio de matrices). Es un programa de análisis numérico creado por The MathWorks en 1984. Está disponible para las plataformas Unix, Windows y Mac OS X.

Oh, I'm sorry, was I supposed to dumb down the concept for you? Perhaps you assumed that my grandparents were not supposed to be able to understand a concept as simple! as MATLAB. Big Mistake, Microsoft. Remember, my brain is inherited two generations down from theirs. Before asking a question, be sure you want it answered... MY way!!

* Write code for an electronic messaging board. What happens when a user logs on?

It says WHAAAZZZZUPPPPP DAWG?

* 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?

I once met a girl who was bold.
I was convinced she'd marry me; I was sold.
It was not meant to be,
For she then dumped me,
Cause that's not the way she rolled.

I talked to my friends who assured me of my fate;
That they'd stick with me until my next date;
And beyond, till I grew old.

* Suppose you are one week away from the product shipping date and discover a bug in your software. What do you do?

Fix it unless it is unfeasible to do so. Follow up with client.

* You have a linked list and don't know how long it is, how do you find the middle of it

Define a subset of two elements in the list. The middle is found by computing the statistical mean. Then define another subset of three elements in the list. The middle is found by computing the statistical mean. Keep doing this inductively.

* How would you test a keyboard?

Depends on the severity of the test and its likeliest environment. If I was testing its strength, I'd first resort to dropping it. Of course, that would be assuming that there are kids involved, which can be the case in the event of a telecommuters home office. If I was testing it for a user's preference, I'd see if the user can make sense of the key layout.

* Write code for finding a duplicate in an array

Linear Search algorithm

* Write code that returns the length of a string without using any built-in functions

Scan string for existence of first letter/token.
Increment counter by one.
Scan next letter (token), increment again.
Keep doing this inductively until whitespace is reached.

* Reverse a Singly Linked List with and without using Recursion

* Find if a BST is well formed

* Reverse every word in a String (abc def becomes cba fed)

See Towers of Hanoi.

* What method would you use to look up a word in a dictionary?

The Lexiographic method:
Scan the first letter in the word, turn to the page(s) in the dictionary that have that letter as the first letter in bold. Scan the second letter in the word, and turn to the pages within the first range of pages that have those initial letters bolded. Keep doing this from left to right in the word until it is narrowed to one entry. If not found, then print that result.

* Write a function that returns the angle between the hour and the minute hands of a clock given input of the time?

From 0 to 180 degrees:

0000: Minute Hand: 0 degrees - hour hand: (0/43200) degrees == 0 degrees.
0001: Minute hand: 6 degrees - hour hand: (1/43200) degrees == ? degrees.
0002: M: 12 - H: (2/43200)

...

* 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.