# [ZION] Microsoft interview questions

```The funnest thing about interviewing at Microsoft are the famous (or
infamous) "interview questions", of which you're likely to get at least
one per interview. A classic example is:```
```
You have three closed barrels in front of you, one filled with black
marbles, one filled with white marbles, and one filled with a mix of
black and white marbles. You also have three labels, one to a barrel,
reading "Black", "White", and "Mixed". You are told that each barrel has
the wrong sign on it. You are allowed to draw one marble from a barrel.
What is the least number of marbles you can draw to put the signs
aright, and from which barrel(s) do you draw it/them? *(Answer below)

Here's one I just got this afternoon that I hadn't heard before, though
I'm pretty sure it's an old question:

You wish to market a climbing chain consisting of some lengths of chain
that can be joined together by carob-beaners (removeable links). Regular
chain links are dirt-cheap; carob-beaners are very expensive. You want
to market a chain set that can be used to create a chain of any length
carob-beaners.) What is the least number of carob-beaners you must
include in the kit, and what are the lengths of chain you must also

Stephen

* Draw one marble from the barrel labeled "Mixed", since you know it's
either the black or the white barrel (it isn't mixed -- the labels are
all wrong). Put the appropriate label on that barrel, move the remaining
"Black" or "White" label onto the now-unsigned barrel, and put the
"Mixed" label on the remaining barrel.

** Short answer: Three carob-beaners, four lengths of chain as follows:
that two carob-beaners is insufficient for making the correct
Two carob-beaners will only allow you to join a maximum of three lengths
of chain; so your third length has to be 21 - 6 - 3 - 1 - 1, or ten
links long. However, you have no way to make a nine-link chain: 6 + 1 +
1 = 8, and 6 + 1 + 3 = 10 (you can't directly join the six-link and
three-link chains without a carob-beaner). So (Point #1) you will
require at least three carob-beaners. Now, if you have three
carob-beaners, that means you can have up to four lengths of chain. But
which case you can only have three lengths of chain, not four), or else
you have to have a one-link length of chain. You can quickly show that
three carob-beaners and three lengths of chain won't work, so (Point #2)
one of your four chain lengths must be a single link. Once you see these
two points, you can play with the combinations and figure out the chain
lengths that will allow you to do it with three carob-beaners. If anyone
has insight how to arrive at an answer faster, please do tell.

//////////////////////////////////////////////////////////////////////////////
///  http://www.zionsbest.com/charter.html      ///
/////////////////////////////////////////////////////////////////////////////

==^================================================================
This email was sent to: archive@jab.org