Microsoft
Microsoft Corporation develops, manufactures, licenses and supports a wide range of software products for various computing devices. The Company’s software products include scalable operating systems for servers, personal computers (PCs) and intelligent devices; server applications for client/server environments; information worker productivity applications; business solutions applications; software development tools, and mobile and embedded devices. Microsoft provides consulting services and product support services and trains and certifies system integrators and developers. The Company sells the Xbox video game console, along with games and peripherals. Its online businesses include the MSN subscription and the MSN network of Internet products and services. The Company’s seven product segments are: Client, Server and Tools, Information Worker, Microsoft Business Solutions, MSN, Mobile and Embedded Devices and Home and Entertainment.
14 Responses to “Microsoft”
Chris Sells’ Microsoft Interview questions
http://www.sellsbrothers.com/fun/msiview/
Blog about jobs and careers at Microsoft
http://blogs.msdn.com/jobsblog
Heather Leigh – a recruiter at Microsoft
http://blogs.msdn.com/HeatherLeigh
Algorithms & Coding : Microsoft Examination Papers
(Avg. of 25 ) : You have b boxes and n dollars. If I want any amount of
money from 0 to n dollars, you must be able to hand me 0 to b boxes so
that I get exactly what I request.” The two questions were “What are
the restrictions on b and n, and how is money distributed among the
boxes?
(Avg. of 49 ) : What is the sum of the numbers from 1 to 1000?
(Avg. of 39 ) : You are an employer. You have ten employees. Each
month, each one of your ten employees gives you ten bags of gold. Each bag
of gold has ten pieces of gold in it. Each piece of gold weighs one
pound. One of your employees is cheating you by only putting nine pieces of
gold in each of his ten bags of gold. You have a scale (not a balance,
a scale), and you can only take one measurement from the scale, only
one (1) reading.
How can you tell which of the ten employees is cheating you by using
this scale and only taking one measurement?
(Avg. of 38 ) : How many points are there on the globe where by walking
one mile south, one mile east and one mile north you reach the place
where you started.
(Avg. of 23 ) : How would go about finding out where to look for a book
in a library? (You do not know how the books are organized beforehand)
(Avg. of 25 ) : 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?
(Avg. of 21 ) : 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?
(Avg. of 18 ) : You are given a scale which you are to use to measure
eight balls. Seven of these balls have the same weight: the eigth ball
is heavier than the rest. What is the minimum number of weighs you could
perform to find the heaviest of the eight balls?. Remmber it’s a scale
not a balance. (i.e. It can just tell you if one side is heavier than
the other it can’t give you the exact weight).
(Avg. of 13 ) : How would you design a toaster?
(Avg. of 10 ) : How would you design an universal remote control?
(Avg. of 22 ) : How would you design a clock for a blind person?
(Avg. of 30 ) : How many miles of road are there in the US
(Avg. of 64 ) : There are n couples attending a party. Each one shakes
hands with the persons he doesn’t know. (Assuming each person knows
his/her partner) Mary and John are a couple. John asked the rest of the
party-attenders how many times he has shaken hands. Each one gives a
unique answer. How many times does Mary shake hands?
Databases : Microsoft Examination Papers
What are two methods of retrieving SQL?
(Avg. of 588 ) : What cursor type do you use to retrieve multiple
recordsets?
(Avg. of 35 ) : What action do you have to perform before retrieving
data from the next result set of a stored procedure?
(Avg. of 36 ) : What is the basic form of a SQL statement to read data
out of a table?
(Avg. of 29 ) : What structure can you have the database make to speed
up table reads?
(Avg. of 16 ) : What is a “join”?
(Avg. of 17 ) : What is a “constraint”?
(Avg. of 11 ) : What is a “primary key”?
(Avg. of 11 ) : What is a “functional dependency”? How does it relate
to database table design?
(Avg. of 15 ) : What is a “trigger”?
(Avg. of 7 ) : What is “index covering” of a query?
(Avg. of 42 ) : What is a SQL view?
Java Questions & Answers
(Avg. of 487 ) : What is the difference between an Applet and an
Application?
Rate it: | View Answers
(Avg. of 133 ) : What are java beans?
Rate it: | View Answers
(Avg. of 57 ) : What is RMI?
Rate it: | View Answers
(Avg. of 28 ) : What gives java it’s “write once and run anywhere”
nature?
Rate it: | View Answers
(Avg. of 33 ) : What are native methods? How do you use them?
Rate it: | View Answers
(Avg. of 26 ) : How does Java inheritance wor?k
Rate it: | View Answers
(Avg. of 58 ) : How many different types of JDBC drivers are present?
Discuss them.
Rate it: | View Answers
(Avg. of 36 ) : What does the “static” keyword mean in front of a
variable? A method? A class? Curly braces {}?
Rate it: | View Answers
(Avg. of 34 ) : Class A subclass B subclass C. All override foo(). I
cast C to A and call foo(). What happens? Can C call A->foo()?
Rate it: | View Answers
(Avg. of 19 ) : Access specifiers: “public”, “protected”, “private”,
nothing?
Rate it: | View Answers
(Avg. of 18 ) : What does the “final” keyword mean in front of a
variable? A method? A class?
Rate it: | View Answers
(Avg. of 28 ) : Does Java have “goto”?
Rate it: | View Answers
(Avg. of 34 ) : Why “bytecode”? Can you reverse-engineer the code from
bytecode?
Rate it: | View Answers
(Avg. of 31 ) : How does exception handling work in Java?
Rate it: | View Answers
(Avg. of 64 ) : Does Java have destructors?
C++ Questions : Microsoft Examination Papers
(Avg. of 1423 ) : What is Operator, Operand, Expression, Statement in
‘C’?
Rate it: | View Answers
(Avg. of 364 ) : What is polymorphism?
Rate it: | View Answers
(Avg. of 84 ) : What is operator overloading?
Rate it: | View Answers
(Avg. of 55 ) : What are templates?
Rate it: | View Answers
(Avg. of 72 ) : Declare a void pointer.
Rate it: | View Answers
(Avg. of 50 ) : Declare a function pointer which takes a pointer to
char as an argument and returns a void pointer.
Rate it: | View Answers
(Avg. of 31 ) : Type-define a function pointer which takes a int and
float as parameter and returns a float *.
Rate it: | View Answers
(Avg. of 94 ) : What does the following C statement do?
while(*c++ = *d++); assuming c and d are pointers to characters.
Rate it: | View Answers
(Avg. of 52 ) : How do you call a C module within a C++ module.
Rate it: | View Answers
(Avg. of 54 ) : What is the difference between run time binding and
compile time binding? Discuss.
Rate it: | View Answers
(Avg. of 20 ) : Compare and contrast C++ and Java.
Rate it: | View Answers
(Avg. of 23 ) : Why does C/C++ give better run-time performance then
Java?
Rate it: | View Answers
(Avg. of 14 ) : Does C++ come with in-built threading support.
Rate it: | View Answers
(Avg. of 19 ) : Class A derives B derives C. All have foo(). I cast C
to A and call foo(). What happens?
Rate it: | View Answers
(Avg. of 27 ) : All classes A, B, C have default constructor, foo()
that calls parent foo() and allocates 100 bytes to their own private local
variable, and a destructor that frees the 100 bytes. I create a C
object and then destroy it. What’s the problem? Did all the memory get
freed? What if I create C, cast to A, and then destroy it. How would I make
sure memory is freed? (destructor must be “virtual” and each destructor
must call parent destructor)
Rate it: | View Answers
(Avg. of 26 ) : What errors are caught at compile time vs link time?
Rate it: | View Answers
(Avg. of 30 ) : What is the value of “a” after this?
int (*a) [10];
a++;
Rate it: | View Answers
(Avg. of 45 ) : What is wrong with this?
main(){
int *ptr;
*ptr=10;
}
Rate it: | View Answers
(Avg. of 39 ) : Given int n, i=10, j=20, x=3, y = 100;
What is the value of n and y at the end of each of the following
expressions?
a) n = (i > j) && (x
Analytical : Microsoft Examination Papers
(Avg. of 343 ) : If you had an infinite supply of water and a 5 quart
and 3 quart pail, how would you measure exactly 4 quarts?
Rate it: | View Answers
(Avg. of 122 ) : If you could remove any of the 50 states, which state
would it be and why?
Rate it: | View Answers
(Avg. of 78 ) : If you are on a boat and you throw out a suitcase, will
the level of water increase?
Rate it: | View Answers
(Avg. of 87 ) : There are 3 ants at 3 corners of a triangle, they
randomly start moving towards another corner. What is the probability that
they don’t collide?
Rate it: | View Answers
(Avg. of 50 ) : Three men were renting a motel figuring the room cost
30 dollars they would pitch in ten a piece.The room was only 25 so they
each gave the bell boy ten,(tip)the bellboy didn”t think that would be
fair so he gave them each back 1 dollar and kept 2 for himself.What
happened to the other dollar?
Thinkers : Microsoft Examination Papers
How are M&Ms made?
If you had a clock with lots of moving mechanical parts, you took it
apart piece by piece without keeping track of the method of how it was
disassembled, then you put it back together and discovered that 3
important parts were not included; how would you go about reassembling the
clock?
If you had to learn a new computer language, how would you go about
doing it?
You have been assigned to design Bill Gates bathroom. Naturally, cost
is not a consideration. You may not speak to Bill.
What was the hardest question asked of you so far today?
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?
Why do you want to work at Microsoft?
Suppose you go home, enter your house/apartment, hit the light switch,
and nothing happens – no light floods the room. What exactly, in order,
are the steps you would take in determining what the problem was?
Interviewer hands you a black pen and says nothing but “This pen is
red.”
Applications : Microsoft Examination Papers
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 implement copy-protection on a control which can be
embedded in a document and duplicated readily via the Internet?
Define a user interface for indenting selected text in a Word document.
Consider selections ranging from a single sentence up through
selections of several pages. Consider selections not currently visible or only
partially visible. What are the states of the new UI controls? How will
the user know what the controls are for and when to use them?
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?
What is the difference between an Ethernet Address and an IP address?
How would you design a coffee-machine for an automobile.
If you could add any feature to Microsoft Word, what would it be?
How would you go about building a keyboard for 1-handed users?
How would you build an alarm clock for deaf people?
Algorithms : Microsoft Examination Papers
What’s the difference between a linked list and an array?
Implement a linked list. Why did you pick the method you did?
Implement an algorithm to sort a linked list. Why did you pick the
method you did? Now do it in O(n) time.
Describe advantages and disadvantages of the various stock sorting algorithms.
Implement an algorithm to reverse a linked list. Now do it without recursion.
Implement an algorithm to insert a node into a circular linked list without traversing it.
Implement an algorithm to sort an array. Why did you pick the method you did?
Implement an algorithm to do wild card string matching.
Implement strstr() (or some other string library function).
Reverse a string. Optimize for speed. Optimize for space.
Reverse the words in a sentence, i.e. “My name is Chris” becomes “Chris is name My.” Optimize for speed. Optimize for space.
Find a substring. Optimize for speed. Optimize for space.
Compare two strings using O(n) time with constant space.
Suppose you have an array of 1001 integers. The integers are in random order, but you know each of the integers is between 1 and 1000 (inclusive). In addition, each number appears only once in the array, except for one number, which occurs twice. Assume that you can access each
element of the array only once. Describe an algorithm to find the repeated number. If you used auxiliary storage in your algorithm, can you find an algorithm that does not require it?
Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
Multiple by 8 without using multiplication or addition. Now do the same with 7.
Add numbers in base n (not any of the popular ones like 10, 16, 8 or 2 – I hear that Charles Simonyi, the inventor of Hungarian Notation, favors -2 when asking this question).
Write routines to read and write a bounded buffer.
Write routines to manage a heap using an existing array.
Implement an algorithm to take an array and return one with only unique elements in it.
Implement an algorithm that takes two strings as input, and returns the intersection of the two, with each letter represented at most once. Now speed it up. Now test it.
Implement an algorithm to print out all files below a given root node.
Given that you are receiving samples from an instrument at a constant rate, and you have constant storage space, how would you design a storage algorithm that would allow me to get a representative readout of data, no matter when I looked at it? In other words, representative of the
behavior of the system to date.
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.
The following asm block performs a common math function, what is it?
cwd xor ax, dx
sub ax, dx
Imagine this scenario:
I/O completion ports are communictaions ports which take handles to files, sockets, or any other I/O. When a Read or Write is submitted to them, they cache the data (if necessary), and attempt to take the request to completion. Upon error or completion, they call a user-supplied function to let the users application know that that particular request has completed. They work asynchronously, and can process an unlimited
number of simultaneous requests.
Design the implementation and thread models for I/O completion ports.
Remember to take into account multi-processor machines.
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 write qsort?
How would you print out the data in a binary tree, level by level, starting at the top?
Microsoft Interview Questions
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
Riddles
Why is a manhole cover round?
How many cars are there in the USA? (A popular variant is “How many gas stations are there in the USA?”)
How many manhole covers 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?
Imagine a disk spinning like a record player turn table. Half of the disk is black and the other is white. Assume you have an unlimited number of color sensors. How many sensors would you have to place around the
disk to determine the direction the disk is spinning? Where would they be placed?
Imagine an analog clock set to 12 o’clock. Note that the hour and minute hands overlap. How many times each day do both the hour and minute hands overlap? How would you determine the exact times of the day that this occurs?
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?
Pairs of primes separated by a single number are called prime pairs. Examples are 17 and 19. Prove that the number between a prime pair is always divisible by 6 (assuming both numbers in the pair are greater than
6). Now prove that there are no ‘prime triples.’ There is a room with a door (closed) and three light bulbs. Outside the room there are three switches, connected to the bulbs. You may
manipulate the switches as you wish, but once you open the door you can’t change them. Identify each switch with its bulb.
Suppose you had 8 billiard balls, and one of them was slightly heavier, but the only way to tell was by putting it on a scale against another.
What’s the fewest number of times you’d have to use the scale to find the heavier ball?
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?
The SF Chronicle has a word game where all the letters are scrambled up and you have to figure out what the word is. Imagine that a scrambled word is 5 characters long:
How many possible solutions are there?
What if we know which 5 letters are being used?
Develop an algorithm to solve the word.
There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman’s pace.
Woman 1: 1 minute to cross
Woman 2: 2 minutes to cross
Woman 3: 5 minutes to cross
Woman 4: 10 minutes to cross
For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what’s the other way?
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?
If you have two buckets, one with red paint and the other with blue paint, and you take one cup from the blue bucket and poor it into the red bucket. Then you take one cup from the red bucket and poor it into the blue bucket.
Which bucket has the highest ratio between red and blue?
Prove it mathematically.
Question asked in microsoft.
You have 8 balls with same shape but different size.you have one weigh machine.Find out the heaviest ball amongst them in such a way that this method is the most efficient method.
Answer– I dont know.Somebody should help.
# Write a C program to swap two variables without using a temporary variable
# What is the 8 queens problem? Write a C program to solve it.
# Write a C program to print a square matrix helically.
# Write a C program to reverse a string
# Write a C program to reverse the words in a sentence in place.
# Write a C program generate permutations.
# Write a C program for calculating the factorial of a number
# Write a C program to calculate pow(x,n)?
# Write a C program which does wildcard pattern matching algorithm
# How do you calculate the maximum subarray of a list of numbers?
# How to generate fibonacci numbers? How to find out if a given number is a fibonacci number or not? Write C programs to do both.
# Solve the Rat In A Maze problem using backtracking.
# What Little-Endian and Big-Endian? How can I determine whether a machine’s byte order is big-endian or little endian? How can we convert from one to another?
# Write C code to solve the Tower of Hanoi problem.
# Write C code to return a string from a function
# Write a C program which produces its own source code as its output
# Write a C progam to convert from decimal to any base (binary, hex, oct etc…)
# Write C code to check if an integer is a power of 2 or not in a single line?
# Write a C program to find the GCD of two numbers.
# Finding a duplicated integer problem *
# Write code to remove duplicates in a sorted array.
# Find the maximum of three integers using the ternary operator.
# How do you initialize a pointer inside a function?
# Write C code to dynamically allocate one, two and three dimensional arrays (using malloc())
# How would you find the size of structure without using sizeof()?
# Write a C program to multiply two matrices.
# Write a C program to check for palindromes.
# Write a C program to convert a decimal number into a binary number.
# Write C code to implement the Binary Search algorithm.
# Wite code to evaluate a polynomial.
# Write code to add two polynomials
# Write a program to add two long positive numbers (each represented by linked lists).
# How do you compare floating point numbers?
# What’s a good way to implement complex numbers in C?
# How can I display a percentage-done indication on the screen?
# Write a program to check if a given year is a leap year or not?
# Is there something we can do in C but not in C++?
# How to swap the two nibbles in a byte ?
# How to scan a string till we hit a new line using scanf()?
# Write pseudocode to compare versions (like 115.10.1 vs 115.11.5).
# How do you get the line numbers in C?
# How to fast multiply a number by 7?
# Write a simple piece of code to split a string at equal intervals
# Is there a way to multiply matrices in lesser than o(n^3) time complexity?
# How do you find out if a machine is 32 bit or 64 bit?
# Write a program to have the output go two places at once (to the screen and to a file also)
# Write code to round numbers
# How can we sum the digits of a given number in single statement?
# Given two strings A and B, how would you find out if the characters in B were a subset of the characters in A?
# Write a program to merge two arrays in sorted order, so that if an integer is in both the arrays, it gets added into the final array only once. *
# Write a program to check if the stack grows up or down
# How to add two numbers without using the plus operator?
# How to generate prime numbers? How to generate the next prime after a given prime?
Hi,
Last week i attended an interview in Microsoft For a position of SQL Support Professionals, for the above said position they r looking for a persons who r having an exp. of 3+ years as a Oracle DBA in Production.
Here i presents the way the interview held.
1. Hi, May i know abt u i mean u r exp. and academics and all.
2. If you lost a control file, and u dont have any backup of that. How u r going to recover that.
3.In this scenario you had lost one of the log file, what you do to recover.
4. What is SMON.
5. What is PMON.
6. How many types of joins exists in Oracle.
7. Can you explain me abt Selfjoin.
Do you know whats the outcome of this technical discussions. What she said is u r too confident on ORacle and this much of Oracle Confident people doesnt migrate to SQL Server.So i regrests your canditature.
Microsoft Paper & Pattern
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
Riddles
Why is a manhole cover round?
How many cars are there in the USA? (A popular variant is “How many gas
stations are there in the USA?”)
How many manhole covers 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?
Imagine a disk spinning like a record player turn table. Half of the
disk is black and the other is white. Assume you have an unlimited
number
of color sensors. How many sensors would you have to place around the
disk to determine the direction the disk is spinning? Where would they
be placed?
Imagine an analog clock set to 12 o’clock. Note that the hour and
minute hands overlap. How many times each day do both the hour and
minute
hands overlap? How would you determine the exact times of the day that
this occurs?
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?
Pairs of primes separated by a single number are called prime pairs.
Examples are 17 and 19. Prove that the number between a prime pair is
always divisible by 6 (assuming both numbers in the pair are greater
than
6). Now prove that there are no ‘prime triples.’
There is a room with a door (closed) and three light bulbs. Outside the
room there are three switches, connected to the bulbs. You may
manipulate the switches as you wish, but once you open the door you
can’t
change them. Identify each switch with its bulb.
Suppose you had 8 billiard balls, and one of them was slightly heavier,
but the only way to tell was by putting it on a scale against another.
What’s the fewest number of times you’d have to use the scale to find
the heavier ball?
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?
The SF Chronicle has a word game where all the letters are scrambled up
and you have to figure out what the word is. Imagine that a scrambled
word is 5 characters long:
How many possible solutions are there?
What if we know which 5 letters are being used?
Develop an algorithm to solve the word.
There are 4 women who want to cross a bridge. They all begin on the
same side. You have 17 minutes to get all of them across to the other
side. It is night. There is one flashlight. A maximum of two people can
cross at one time. Any party who crosses, either 1 or 2 people, must
have
the flashlight with them. The flashlight must be walked back and forth,
it cannot be thrown, etc. Each woman walks at a different speed. A pair
must walk together at the rate of the slower woman’s pace.
Woman 1: 1 minute to cross
Woman 2: 2 minutes to cross
Woman 3: 5 minutes to cross
Woman 4: 10 minutes to cross
For example if Woman 1 and Woman 4 walk across first, 10 minutes have
elapsed when they get to the other side of the bridge. If Woman 4 then
returns with the flashlight, a total of 20 minutes have passed and you
have failed the mission. What is the order required to get all women
across in 17 minutes? Now, what’s the other way?
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?
If you have two buckets, one with red paint and the other with blue
paint, and you take one cup from the blue bucket and poor it into the
red
bucket. Then you take one cup from the red bucket and poor it into the
blue bucket. Which bucket has the highest ratio between red and blue?
Prove it mathematically.
Algorithms
What’s the difference between a linked list and an array?
Implement a linked list. Why did you pick the method you did?
Implement an algorithm to sort a linked list. Why did you pick the
method you did? Now do it in O(n) time.
Describe advantages and disadvantages of the various stock sorting
algorithms.
Implement an algorithm to reverse a linked list. Now do it without
recursion.
Implement an algorithm to insert a node into a circular linked list
without traversing it.
Implement an algorithm to sort an array. Why did you pick the method
you did?
Implement an algorithm to do wild card string matching.
Implement strstr() (or some other string library function).
Reverse a string. Optimize for speed. Optimize for space.
Reverse the words in a sentence, i.e. “My name is Chris” becomes “Chris
is name My.” Optimize for speed. Optimize for space.
Find a substring. Optimize for speed. Optimize for space.
Compare two strings using O(n) time with constant space.
Suppose you have an array of 1001 integers. The integers are in random
order, but you know each of the integers is between 1 and 1000
(inclusive). In addition, each number appears only once in the array,
except
for one number, which occurs twice. Assume that you can access each
element of the array only once. Describe an algorithm to find the
repeated
number. If you used auxiliary storage in your algorithm, can you find
an
algorithm that does not require it?
Count the number of set bits in a number. Now optimize for speed. Now
optimize for size.
Multiple by 8 without using multiplication or addition. Now do the same
with 7.
Add numbers in base n (not any of the popular ones like 10, 16, 8 or 2
– I hear that Charles Simonyi, the inventor of Hungarian Notation,
favors -2 when asking this question).
Write routines to read and write a bounded buffer.
Write routines to manage a heap using an existing array.
Implement an algorithm to take an array and return one with only unique
elements in it.
Implement an algorithm that takes two strings as input, and returns the
intersection of the two, with each letter represented at most once. Now
speed it up. Now test it.
Implement an algorithm to print out all files below a given root node.
Given that you are receiving samples from an instrument at a constant
rate, and you have constant storage space, how would you design a
storage algorithm that would allow me to get a representative readout
of
data, no matter when I looked at it? In other words, representative of
the
behavior of the system to date.
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.
The following asm block performs a common math function, what is it?
cwd xor ax, dx
sub ax, dx
Imagine this scenario:
I/O completion ports are communictaions ports which take handles to
files, sockets, or any other I/O. When a Read or Write is submitted to
them, they cache the data (if necessary), and attempt to take the
request
to completion. Upon error or completion, they call a user-supplied
function to let the users application know that that particular request
has
completed. They work asynchronously, and can process an unlimited
number of simultaneous requests.
Design the implementation and thread models for I/O completion ports.
Remember to take into account multi-processor machines.
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 write qsort?
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 implement copy-protection on a control which can be
embedded in a document and duplicated readily via the Internet?
Define a user interface for indenting selected text in a Word document.
Consider selections ranging from a single sentence up through
selections of several pages. Consider selections not currently visible
or only
partially visible. What are the states of the new UI controls? How will
the user know what the controls are for and when to use them?
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?
What is the difference between an Ethernet Address and an IP address?
How would you design a coffee-machine for an automobile.
If you could add any feature to Microsoft Word, what would it be?
How would you go about building a keyboard for 1-handed users?
How would you build an alarm clock for deaf people?
Thinkers
How are M&Ms made?
If you had a clock with lots of moving mechanical parts, you took it
apart piece by piece without keeping track of the method of how it was
disassembled, then you put it back together and discovered that 3
important parts were not included; how would you go about reassembling
the
clock?
If you had to learn a new computer language, how would you go about
doing it?
You have been assigned to design Bill Gates bathroom. Naturally, cost
is not a consideration. You may not speak to Bill.
What was the hardest question asked of you so far today?
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?
Why do you want to work at Microsoft?
Suppose you go home, enter your house/apartment, hit the light switch,
and nothing happens – no light floods the room. What exactly, in order,
are the steps you would take in determining what the problem was?
Interviewer hands you a black pen and says nothing but “This pen is
red.”
Steps r..
1) Written test of one hour which include
cat type of aptitude question which can be handled easely and in same section u will be asked even some puzels like make 4 lines in 3 by 3
dots by covering all the dots. something of these sort will be asked. these r some wat hard in this section.
Next part is c-lang which is the most important. For me they asked tricky pointers questions and some questions based on short circuit
evaluation etc. if u can make well here then ur thru witten test.
There will be individual cutoff in both the section.
Roughly abt 30% will be selected. so becarefull here.
2) Group Discussion
This is second elimination round. roughly around 2-3 ppl will be selected among grp of 10.
Good communication skills r very necessary.
For me topic is: IMPACT OF INTERNET ON SOCIETY.
3) Personal Interview.
If u r here then u shul not expect tat u will be selected. They will be asking abt projects tat u hav done. I didnt do any project as i am just abt to
enter 4th year of my b-tech. So here i lost the process. Go prepared with any project even if you have not done.
There are 3 sections
1. analitical 25 questions ( 30 minutes)
2. reasoning 25 questions (25 minutes)
3. verbal 20 questions (20 minutes)
The analitical part consists of
1.In a class 25 play cricket 15 play fut ball and soo on
they may ask u how many play both or some questions based on that
(it is some what tough than wht we think
there may be 5 to 6 questions based on one problem)
2. problem on cubes division of them into some equal parts and placing them one by one and and painting them with some color like that questions
(even here there are many quiestions based on this problem)
3. some simple questions which may not link to others
(some wht easy to attempt)
Logical part consists of
1. data suficiency problems
i.e he gives some thing to us and ask whether we can get answer by considering only first statement or only second statement or both or none.
2. comparing similarity
he gives you 3 figures (numbers ) we have to see whether they are similar or not
this is the easiest part of the exam
Verbal part consists of
1. similar meanings
2. antonyms
3. passages
(some what tough)
4.synonyms
this is the pattern or even questions which were givenin the Microsoft GTSC it does not contains any technical part here we have similar questions in new dimention which are some what teasing than others.
hope this information is enough for those who are willing to attempt this
1. Find out median of 2 sorted array.
2. Replace all . (dot) with tabs in a text file without changing . (dot) in numbers like 2.5
3. Delete a given node in a linked list without having start node.
Most popular employers
Leave a comment:
Did you interview at Microsoft? Did you get a job at Microsoft? Did you get hired at Microsoft? How do you like working at Microsoft? Or you didn't find a company and want to add one? Do you need to post your resume online? Post your resume at DevResumes.



