Statement of Purpose

This web page was originally conceived as a means of efficiently transferring specific information that could be expressed textually. That information consisted of a pool of interview questions that are asked of summer interns at software companies like Microsoft and Hewlet-Packard. The idea was to pool these questions, and then distribute them among those that contributed, thus better preparing those people for future interviews. It's recommended that you treat the questions as if they are being asked in an interview -- try and work the solution out, then go and check the answer. I'm thinking about trying to make this into a Forms-enabled server which would allow the reader to ask for hints, but I haven't quite gotten around to it, yet.


Obviously, if you have this page, you can do whatever you want with it. In order to enable this page to grow, however, this set of pages shouldn't be given out -- they should be traded in exchange for an interview question. The unofficial rule is: in order to receive a copy of the page, you have to contribute an unique question to the page, as well as it's solution. It would be nice to note which company the question was asked at, or the source, etc. Please send any new questions to


Where they will be incorporated into the Master Set. Anybody sending me a new question will be the most recent copy of the Master Set. Oh, by the way, "Unique" in this sense means that the question isn't yet listed within the pages anywhere. Or a new and better solution to a currently posted question would be good enough.

Future Directions
Putting this on it's own web page Forms server:
Hints for the questions
Adding your own questions to the pages
Password Protection?

The Questions Themselves

As such, there are a number of different types of questions posted here, arranged roughly according to the type of question at this point, most of the questions pertain to programming (not surprisingly) The physical layout is as follows: This page serves as an intro, and links to both the Questions page, and the Answers page. Each of the questions on the Questions page contains a link to its answer.

The Question Table
Programming General Questions
Reverse a Linear Linked List Gold Mine
Implement A Stack Using A Linked list  
Detecting A Palindrome Light Bulb
Determine the binary rep of a given number Golf Balls
Write Quicksort Five and Three Gallon Bottle
Write strcmp (String Compare) Mixing Paint Colors
Write IsSubstring(a,b), which determines if b is a substring of a Walking Around....
Describe how you would write malloc() and free() Given:A Scale and ten masses
Write BASIC's Left and Right functions Given: A scale and ten boxes
Swapping values w/o using more space Ice Cube Melting
Eliminate duplicate values in an array Sum the integers from 1 to 100 in your head
Numbers in base -2 Infinite Red-Black Plane
Write an algorithm for x^y Joe and Fred vs. the Train
Write pair of functions that deal cards  
Mystery Function Number One  
Mystery Function Number Two  

As a general note, my experience with MS interview questions is that they've generally been programming oriented. Write me code that does this, how would you accomplish this, etc, etc. At the same time, the golf ball question came from someone at MS, so be forewarned. HP seems to ask more science-oriented questions, from what I hear.

Back To Mike's Home Page