Interview Questions

Microsoft Interview Questions 3

Microsoft Interview Questions and Answers


(Continued from previous question...)

Microsoft Interview Questions 3

1. Why do you want to work for Microsoft?

2. What would you do to figure out how often or if a particular product feature is being used?

3. You have a puzzle box that looks like this (they drew it on the white board, and this is my crappy MS Paint drawing)...
As you can see there are 8 boxes. Place the numbers 1 through 8 in each square so that no consecutive number touches another (including diagonally). In other words, 1 cannot touch 2, 5 cannot touch 6, 5 cannot touch 4, etc, etc.
Write me a function for the game of tic-tac-toe in C# that returns a bool. you name the params. Tell me if X has won the game. So you have...
NOTE: click the DidXWin link below to see an answer...
bool DidXWin( ) {
// you fill in the blank
}

Write me a function in C# (don't use the VB library) that takes in a string value and returns a string value that is reversed.
NOTE: click the Reverse link below to see an answer...
static string Reverse(string s) {
// you fill in the blank
}

Given an unsorted array with values 1 to 100, there is one number that is missing. The missing value will be zero. How would you find the missing number? Write test cases for this code?

4. How would you test an application that takes 3 inputs and draws a triangle? (black box testing)

5. Write a data structure class that works as both a Stack and a Queue. Write test cases for them.

6. Write code to reverse a linked list. Write test cases.

7. Write code to merge-sort 2 linked lists (no duplicates). Write test cases.

8. Write code to delete all nodes in a linked list that contain integer values that are odd numbers. Write test cases.

9. Write code to delete alternate nodes in a doubly linked list. Write test cases.
- Given "ABC/EF" where do you place values G, H, and I. (pattern matching puzzle).
- 2 men are walking through a tunnel on a train track. They see a train and start to run out of the tunnel. They are 2/3 the way through. Person A runs forward the remainder of the distance. Person B runs back the way he came in. Both men run 10MPH and they both barely make it out of the tunnel before the train hits them. How fast was the training moving?

10. How do you detect if a linked list is null terminated or circular?

11. Write code to find the lowest common ancestor node in a BST.

You are on a job, the deadline is tight, the CIO gets pissed about a server that is down and tells you to get on it immediately. Your deadline isn't going to move, you are billable per hour, and the guy is breathing down your neck until you take care of it. What do you do?

We deal with pretty much only fortune 500 companies...what kind of design work have you done for specifications? What design tools have you used? What methodologies?

What do you have to offer us? How do you fit in to our model of design work, and how does your experience match?

Let's say you have a linked list from 1 to N in length. What's the minimum number of iterations to find a particular value? The maximum? The average? How do you delete a node in the middle of the list?

Write me a function that takes a string and returns a boolean to identify if the param is a palindrome. (a variation of the infamous C# StringReverse question). OK, now change it around so the param is an integer...how do you handle that?

Design an object model for a tic-tac-toe game.

Amazon.com has hired you to design their system in .NET. List 10 business requirements and then draw me a design to meet the requirements. Don't just put UI, BL, DL, DB either. "I will be back in 45 minutes (note: guy comes back in 15 minutes later)." Explain your requirements list to me. Explain your design diagram to me. Why did you do it that way?

What's the benefit of the COM+ component? How does a queued component work?

Explain how to use Active Directory for logins in an application? How do you secure passwords? What's a hash?

OK, here's a list of XML nodes...there could be a million of these things. How do you identify parent nodes that have matching subnodes? For example, nodes 1 and 4 are duplicates because they both contain subnode1, subnode2, subnode3

How do you fit a giraffe in a refrigerator? OK, how do you fit an elephant with it?

You are standing by a river full of alligators. How do you cross the river?

Tell me all of the events that fire on a page when it's not on a postback?

What is an HttpModule? How does it work?

Explain to me the entire process of how a request comes from a browser and ultimately gets handled by .NET? (For example, an answer could be: data goes through either port 80 or 443, gets handled by IIS that runs as a service in Windows that listens on those ports, the extension is mapped into IIS that has an ISAPI filter mapped to .aspx, .aspx, etc. The runtime gets called to run by IIS and the Web site is up..etc,etc) In the middle of all of that he asked "What mode does IIS run in, kernel or user mode?" "What about Windows Server 2003?"

Troubleshooting: You have a Sql Server that is running slow, what do you do? OK, you checked the query plan for table scans, you fixed some indexes...it is still slow, now what? OK, you now know there is plenty of memory...now what? OK, so you checked your network settings (TCP/IP, named pipes config)...it is still slow? OK...great...so let's say there was a disk bottleneck, what do you do? (Note: I basically brought up "bad query", poor indexing, stored proc recompiling, bad network connection, not enough memory, 2GB address space instead of 3GB, not enough processors, no raid on the hard drives, broken mirror, etc, etc - everything I could think of. Seemed to be good enough).

Infrastructure: Draw me a diagram of Web architecture with a firewall on the outside and in between the DMZ. How do you allow outgoing Web requests plus internal DB requests? How do you protected the DB on an internal network? How does the Web Server communicate with the DB? What is IPSec? What do you know about LDAP? What is NTLM? What is Kerberos? What have you done with load balancing multiple web servers? What is DNS, WINS, DHCP, TCP, UDP?

(Continued on next question...)

Other Interview Questions