The following are actual questions from actual interviews conducted by Microsoft employees on the main campus. Microsoft Consultants are sometimes allowed to have a life, so questions asked of them during interviews don't really count and aren't listed.

The questions tend to follow some basic themes:

Riddles
Algorithms
Applications
Thinkers

Those of you who have visited this page in the not so distant past may notice that there are fewer questions then there used to be. I've trimmed them to a representative sample of only my favorites for one simple reason: posers. It seems like some folks were using this list to fake their way thru interviews. To my knowledge, no one was able to get a job at Microsoft that wasn't up to it, but some interviewees were able to get further than they should have. I want the software I get from Microsoft to get better, not worse!


Riddles

  • Why is a manhole cover round?
  • How many cars are there in the USA?
  • You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?
  • One train leaves Los Angeles at 15mph heading for New York. Another train leaves from New York at 20mph heading for Los Angeles on the same track. If a bird, flying at 25mph, leaves from Los Angeles at the same time as the train and flies back and forth between the two trains until they collide, how far will the bird have traveled?
  • You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then a marble will be picked from the jar. Placing all of the marbles in the jars, how can you maximize the chances of a red marble being picked? What are the exact odds of getting a red marble using your scheme?
  • Imagine you are standing in front of a mirror, facing it. Raise your left hand. Raise your right hand. Look at your reflection. When you raise your left hand your reflection raises what appears to be his right hand. But when you tilt your head up, your reflection does too, and does not appear to tilt his/her head down. Why is it that the mirror appears to reverse left and right, but not up and down?
  • You have 4 jars of pills. Each pill is a certain weight, except for contaminated pills contained in one jar, where each pill is weight + 1. How could you tell which jar had the contaminated pills in just one measurement?
  • If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
  • You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the same?
  • Which way should the key turn in a car door to unlock it?
  • If you could remove any of the 50 states, which state would it be and why?


Algorithms

  • What's the difference between a linked list and an array?
  • Implement an algorithm to sort a linked list. Why did you pick the method you did?
  • Implement an algorithm to sort an array. Why did you pick the method you did?
  • Implement strstr() (or some other string library function).
  • Reverse a string. Optimize for speed. Optimize for space.
  • Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
  • How would you find a cycle in a linked list?
  • Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array of ints.
  • Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value.
  • Write a function to print all of the permutations of a string.
  • Implement malloc.
  • Write a function to print the Fibonacci numbers.
  • Write a function to copy two strings, A and B. The last few bytes of string A overlap the first few bytes of string B.
  • How would you print out the data in a binary tree, level by level, starting at the top?

Applications

  • How can computer technology be integrated in an elevator system for a hundred story office building? How do you optimize for availability? How would variation of traffic over a typical work week or floor or time of day affect this?
  • How would you redesign an ATM?
  • Suppose we wanted to run a microwave oven from the computer. What kind of software would you write to do this?
  • How would you design a coffee-machine for an automobile.

Thinkers

  • How are M&Ms made?
  • If you had to learn a new computer language, how would you go about doing it?
  • If MS told you we were willing to invest $5 million in a start up of your choice, what business would you start? Why?
  • If you could gather all of the computer manufacturers in the world together into one room and then tell them one thing that they would be compelled to do, what would it be?
  • Explain a scenario for testing a salt shaker.
  • If you are going to receive an award in 5 years, what is it for and who is the audience?
  • How would you explain how to use Microsoft Excel to your grandma?
  • Why is it that when you turn on the hot water in any hotel, for example, the hot water comes pouring out almost instantaneously?

Go back


This page's content provided by Chris Sells
This page designed by Valerie Bradley
Last updated: