Top 10 Best Microsoft Interview Questions


As the founder of CareerCup, the web's largest source for technical interview questions, I have over 500 Microsoft Interview Questions at my disposal, with more added every day. Everyday people ask me what they should study before their Microsoft interview.

So, without further ado, I present the the Top 10 Best Microsoft Interview Questions:

Microsoft Interview Question #10 Given two nodes in a binary tree, find the first common parent node. You are not allowed to store any nodes in a data structure.

Microsoft Interview Question #9 Simulate a 7 sided die using a 5 sided die.

Microsoft Interview Question #8 How long would it take to sort 1 billion numbers?

Microsoft Interview Question #7 Given two sets of objects, S1 and S2, write an algorithm to determine their subset relationship. Eg, which of the following is true: C1 is a subset of C2, C2 is a subset of C1, C1 equals C2, or none of these?

Microsoft Interview Question #6 Given a value in a binary search tree, print all the paths (starting from the root or any other node) which sum up to that value.

Microsoft Interview Question #5 Imagine there is a square matrix with n x n cells. Each cell is either filled with a black pixel or a white pixel. Design an algorithm to find the maximum subsquare such that all four borders are filled with black pixels.

Microsoft Interview Question #4 How would you divide an integer array into 2 sub-arrays such that their averages were equal?

Microsoft Interview Question #3 Given two binary trees T1 and T2 which store character data, write an algorithm to decide whether T2 is a subtree of T1. T1 has millions of nodes and T2 has hundreds of nodes, and each may have duplicates.

Microsoft Interview Question #2 Implement boggle: Given an NxN matrix, print a list of all words that appear in the matrix. To find a word, you can move left, right, up or down, as long as you do not use the same letter twice. For example, if the matrix were: W A D R You could find the words: WAR, WARD, DRAW and RAW Microsoft Interview Question #1 Design a webcrawler.