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 between one and twenty-one links, without any "left-over" links. (That is, you must have exactly 21 links in your kit, including 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 include? **(Answer below) Stephen (SPOILER: Answers below) * 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: 7 links, 7 links, 3 links, 1 link. Longer answer: You can quickly show that two carob-beaners is insufficient for making the correct combinations, since you must then have a three-link chain (your carob-beaners only combine for two links), and then a six-link chain (your three-link chain and carob-beaners only combine for five links). 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 how do you go from a 20-link chain to a 21-link chain? You have to add on a single link. That last link is either one of your carob-beaners (in 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. ////////////////////////////////////////////////////////////////////////////// /// ZION LIST CHARTER: Please read it at /// /// http://www.zionsbest.com/charter.html /// ///////////////////////////////////////////////////////////////////////////// ==^================================================================ This email was sent to: archive@jab.org EASY UNSUBSCRIBE click here: http://topica.com/u/?aaP9AU.bWix1n.YXJjaGl2 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================