MicroSoft Interview Question
Interviewing at Microsoft
Over the years I've been collecting interview questions from Microsoft. I guess I started this hobby with the intent of working there some day, although I still have never interviewed there myself. However,
I thought I'd give all of those young Microserf wanna-bes a leg up and publish my collection so far. I've actually known people to study for weeks for a Microsoft interview. Instead, kids this age should be out having a life. If you're one of those -- go outside! Catch some rays and chase that greenish monitor glow from your face!
If you've actually interviewed at Microsoft, please feel free to contribute your wacky Microsoft interview stories.
Ed Helms on Microsoft Recruiting
Tue 7/25/2006 10:52 PM
This spoof on Microsoft's college recruiting practices was recorded long ago (back with the XBox was new), but it has recently surfaced again, so I thought I'd share. Enjoy.
Wasting the Prince of Darkness
Wed 11/23/2005 9:43 AM
From "Pete" (not his real name):
I walked into my first technical interview at Microsoft, and before I could say anything, the woman says, ?You?re in an 8x8 stone corridor.? I blink and sit down.
Interviewer:?The prince of darkness appears before you.
Me:?You mean like, the devil?
Interviewer:?Any prince of darkness will do.
Me:ok.
Interviewer: ?What do you do?
Me:<pause> ?Can I run?
Interviewer: ?Do you want to run??
Me:Hmm? I guess not ?Do I have a weapon??
Interviewer: ?What kind of weapon do you want??
Me:?Um? something with range??
Interviewer: ?Like what??
Me:?Uh? a crossbow??
Interviewer: ?What kind of ammo do you have??
Me:<long pause> ?Ice arrows??
Interviewer: ?Why??
Me:<floundering> ?Because the prince of darkness is a creature made of fire????
Interviewer: ?Fine? so what do you do next??
Me:?I shoot him??
Interviewer: ?No? what do you do??
Me:<blank stare>
Interviewer: ?You WASTE him! You *WASTE* the prince of darkness!!?
Me:<completely freaked out and off my game> Holy crap? what have I gotten myself into.
She then tells me that she asks that question for two reasons. 1) Because she wants to know if the candidate is a gamer (which is apparently really important? please note: I?m not a gamer) and 2) because she wants her question to show up on some website. I hate to accommodate her, but this is definitely the weirdest interview question I?ve ever heard of.
Well, here you go, weird-prince-of-darkness-wasting-lady...
Stumped
Tue, 9/6/05 , 2:29pm
Scott Hanselman's "Great .NET Developer" Questions
Tue, 2/22/05 12:30pm
Scott Hanselman has posted a set of questions that he thinks "great" .NET developers should be able to answer in an interview. He even splits it up into various categories, including:
- Everyone who writes code
- Mid-Level .NET Developer
- Senior Developers/Architects
- C# Component Developers
- ASP.NET (UI) Developers
- Developers using XML
Am I the only one that skipped ahead to "Senior Developers/Architects" to see if I could cut Scott's mustard?
Jason Olson's Microsoft Interview Advice
Fri, 1/21/05 8:16pm
Jason Olson recently interviewed for an SDE/T position (Software Development Engineer in Test) at Microsoft and although he didn't get it, he provides the following words of advice for folks about to interview for the first time:
- Just Do It
- Remember, no matter how much you might know your interviewer, it is important to not forget that it is still in interview
- Pseudocode! Pseudocode! Pseudocode!
- But, as long as you verbalize what you're thinking you should be in pretty good shape
- Bring an energy bar or something to snack on between breaks in order to keep your energy level up
- [B]ring a bottle of water and keep it filled up
- A lunch interview is still an interview!
- Know the position you're interviewing for [ed: unless you're interviewing for an editing position, in which case you should know the position for which you're interviewing]
- Your interview day is not only your opportunity to be interviewed, but also your opportunity to interview the team/company
You can read the full story on his web site.
"Standing Out" When Submitting Your Resume
Sun, 8/22/04 8:22am
After seeing all of those pictures in Wired of the wacky letters that people send, I love the idea of Michael Swanson opening the floodgates by sending his resume along with a life-size cardboard figure . What's next?
Some of the MS Interview Process Filmed (Finally!)
Fri, 8/20/04 3:22am
Channel9 did what I was unable to ever get done: filmed some of the interview process ( part 1 , part 2 and part 3 ). It's not an actual interview, but Gretchen Ledgard and Zoe Goldring, both Central Sourcing Consultants at HR for MS, lead you through what to expect at a Microsoft interview, providing a wealth of wonderful tips, e.g.
- MS is casual, so it doesn't matter so much what you where (i.e. don't feel you have to wear a suit, but don't show up in flip-flops and headphones around your neck [still playing!]). Regardless of what you where, it's what's in your head that's important.
- Interact a lot of with the interviewer. Ask questions, think out loud, etc. The questions are meant to be vague and again, it's about what's going on in your head, so verbalize it.
- Bring water if you're thirsty, not coffee, as spilling coffee is going to leave a much more lasting stain/impression.
- MS rarely asks logic/riddle questions anymore. They're not a good indicator of a good employee.
- Expect coding questions if you're a dev, testing questions if you're a tester and passion questions no matter what.
- If an MS recruiter calls, don't expect them to have a specific job in mind. Instead, expect to be asked what you'd like to do at MS.
- If the first interview doesn't take, it may well be that you're right for MS but not right for that job. It can literally take years to find the right job for you at MS.
BTW, I have to say that I never got a ride on an HR shuttle. I guess they save that for the "good" hires... : )
Discuss
Questions for Testers
Tue, 7/20/04 4:19pm
A friend of mine sent along some questions he was asked for a SDE/T position at Microsoft (Software Design Engineer in Test):
- "How would you deal with changes being made a week or so before the ship date?
- "How would you deal with a bug that no one wants to fix? Both the SDE and his lead have said they won't fix it.
- "Write a function that counts the number of primes in the range [1-N]. Write the test cases for this function.
- "Given a MAKEFILE (yeah a makefile), design the data structure that a parser would create and then write code that iterates over that data structure executing commands if needed.
- "Write a function that inserts an integer into a linked list in ascending order. Write the test cases for this function.
- "Test the save dialog in Notepad. (This was the question I enjoyed the most).
- "Write the InStr function. Write the test cases for this function.
- "Write a function that will return the number of days in a month (no using System.DateTime).
- "You have 3 jars. Each jar has a label on it: white, black, or white&black. You have 3 sets of marbles: white, black, and white&black. One set is stored in one jar. The labels on the jars are guaranteed to be incorrect (i.e. white will not contain white). Which jar would you choose from to give you the best chances of identifying the which set of marbles in is in which jar.
- "Why do you want to work for Microsoft.
- "Write the test cases for a vending machine.
"Those were the questions I was asked. I had a lot of discussions about how to handle situations. Such as a tester is focused on one part of an SDK. During triage it was determined that that portion of the SDK was not on the critical path, and the tester was needed elsewhere. But the tester continued to test that portion because it is his baby. How would you get him to stop testing that portion and work on what needs to be worked on?
"Other situations came up like arranging tests into the different testing buckets (functional, stress, perf, etc.)."
What do job interviews really tell us?
Tue, 7/6/04 12:20pm
For the New Yorker, Malcolm Gladwell discusses various indicators of how well interviews actually work for screening job candidates (in a phrase: not very well). The discussion of how we make our decision about someone in the first 2 seconds after seeing them and then use our future interactions with them to either reinforce our initial reaction or forgive as an aberration is particularly telling.
"Interviews are practically worthless for screening candidates."
Tue, 7/6/04 12:17pm
Bram Cohen, the inventor of BitTorrent, discusses his thoughts on interviewing , include:
- "In an interview you can tell if a person is a pleasant conversationalist, and you can give some technical questions to rule out the truly inept, but beyond that you might as well be rolling dice."
- "I'd like to note that in an all-male work environment hiring an attractive female is probably good for morale."
- "Even though work history doesn't correlate with job performance, being a lying sack of shit almost certainly does."
Fun. : )
HR Bloggers
Fri, 3/19/04 8:11pm
I've heard for years that MS HR uses my site as part of their internal HR training, although I've never heard it from the HR folks themselves. Until now.
On Wednesday, Heather Hamilton , an MS recruiter, said that my "site is legendary, especially here in staffing."
On Monday, Zoe Goldring , also an MS recruiter, said "Net/Net ? Chris?s site is great. Plus I respect the fact that he doesn?t give the answers to the questions!"
And, to top it off, they're even bloggers , and they provide a whole host of interesting info for folks interested in interviewing at Microsoft. Certainly, I'd trust anything you read on their blogs far more than the stuff on this one, most of which was obtained far before I ever worked at MS.
Interviewing for MS Interns
Fri, 2/6/04 3:33pm
Shawn Morrissey (my boss) posted some questions he asked at UPenn's Wharton School of Business :
- Explain a database to a young child.
- Explain the Internet to your grandparents
- What is your favorite web site? Why? Now improve it.
- Steve Jobs calls and asks you to improve the iPod. Go. (No bonus points for saying, ?Add WMA support!)
- You?re in a boat with a rock, on a fresh-water lake. You throw the rock into the lake. With respect to the land, what happens to the level of the water in the lake ? goes up, goes down, stays the same?
He posted a couple of answers, but you'll have to read his post for them.
Interviewing at Lego
Sat 1/10/2004 10: 12am
Jamie, a contender for a Master Builder spot at Lego, describes a very different interview process than you're likely to get at Microsoft (except that 'softies hit you with sneaky stuff, too, sometimes : ).
Robert Scoble on Interviewing at Microsoft
Wed 8/13/2003 10:23 AM
Robert Scoble ( the Scobleizer ) sent along his answer to a common question: What is it like to interview at Microsoft?
About dress code while interviewing at Microsoft. Yeah, I wore a suit and tie. Not mandatory (no one wears them up here) but I feel it still shows respect for the company hiring you, and for the interviewing process. And, it makes it so I never wonder if I under dress. Microsoft employees might joke with you about being overdressed, though. That's cool. I'd rather that then have someone write me off cause I didn't dress well enough. But then, I was also up for a job that required me to be in front of people, so I'd expect to wear a suit and tie on the job occasionally.
The process for me was:
- An exec asked me "would you ever consider working here?"
- A one-hour phone interview with HR. They asked me questions to make sure my experience matched my resume, and also to make sure I wasn't gonna embarrass them in the longer interviews.
- I passed the HR interview, so they flew me up to Redmond .
- My interviews started at 8:30 a.m. First interview was with someone else from HR. She explained the process, and asked a few more questions to ensure I was gonna be worth sending onto the first group.
- She gave me a list of three candidates, which would take me through lunch. She was pretty clear that if the three liked me, I'd get another list of "after lunch" candidates.
Each interviewer would meet me at the lobby (Microsoft has a recruiter shuttle that'll fly you around). I'd usually try to get a question in, like "what role do you play here?" Just to get things going.
The kinds of questions you'll get will vary, but I got a lot of questions about past experience, and some more fun ones "how would you get Google to convert from Linux to Windows?" Other people have gotten questions like "how would you sell ice to eskimos?" or "how would you sell a pen to someone?"
If you're up for a programmer job, they'll ask you logic questions, and ask you to demonstrate that you can think in code on the whiteboard.
One guy asked me to explain the architecture of Radio UserLand on the whiteboard.
There's an excellent book written on the Microsoft interviewing process called "Moving Mount Fuji."
I also read Chris Sells' "Interviewing at Microsoft" site: http://www.sellsbrothers.com/fun/msiview/
Some more advice: I came an hour early and took an early-moring walk around the campus. That helped me calm my mind down, and get into what it's like being there. Also, it let me think about "why do I want to work at Microsoft?" which was one of my first interview questions.
I brought my own water bottle. That saved awkward moments where interviewers would want to take you to the company refrigerators. It also makes it look like you aren't there to take advantage of Microsoft's largess. Try not to drink too much during the day. The temptation is to drink a Diet Coke on every interview. You can get a bit jittery by the end of the day.
I also treated everyone I met as an interview candidate. I have no idea if the recruiting shuttle drivers report back on their feedback or not, but why take the chance? Plus, the stories you hear are often good ones to tell later on.
They did interview me over lunch, by the way, and also took me to a Sonics' game . I'm sure that was to get a feel for how I'd be in social situations. Behave, and geek out! (we only watched about five minutes of the Sonics' game cause we were so busy talking tech).
I later found out that they usually have three to seven candidates fly up for each job and that flying up isn't any guarantee of a job. A few friends have gotten flown up and didn't pass muster.
My wife has interviewed here too and didn't get hired. I think it's solely on passion. Most of the people who work here are hard-core geeks and they like hiring other geeks. Anything you can say to demonstrate that you're a geek and that you love playing with technology is probably a good thing.
Later I found out that the flyup interview is mostly to see if the candidate can fit into both the job, and work with the team. They figure you're mostly qualified because you got that far. They're just trying to make sure you'll fit in at that point.
Don Box also gave me some advice: "we want you to think, so think." The way another friend of mine put it, is "look like you think about every answer. Take a few seconds to think about it."
My answer to the Google question? "Acquire them." Hey, it worked for Hotmail. (Seriously, then I followed that smartass answer up with a more serious one ) . Luckily I had spent a few hours with some of the kids who started Hotmail, so I knew what the pain points were in getting them to move their system from FreeBSD to Windows.
When did I know I had the job? At about 6 p.m. , the guy who invited me up, told me I had gotten a job. Turned out I wasn't appropriate for the job I was interviewing for (which he knew) and then he made a new job. It took a couple of weeks to get all the T-s crossed from that point. Other people don't learn whether or not the got the job for a week or two afterward. It's OK to ask at the end.
If you get walked to the door at lunch, though, you know you blew it somewhere. (Not many get walked to the door, from what the recruiting shuttle drivers tell me).
One last piece of advice: keep your energy up all day long. It's tough. Hard to think straight at 4 p.m. after answering questions all day long. But, a lot of the decisions are made on "does this guy get excited by technology?"
Good luck in your interviews!
--Robert
How Would You Move Mount Fuji?
Thu, May 29, 2003
If you're interested in a book about the high-tech interview process, including lots of info about MS specifically (and some material from yours truly), check out How Would You Move Mount Fuji? by William Poundstone.
My Interview
Fri, Apr 18, 2003
After never thinking that I would , I had two days of interviews at Microsoft in the middle of March, 2003. The first day was with the MSDN content group. They're the folks responsible for all of the technical articles at http://msdn.microsoft.com and the ones at Microsoft with the job most closely related to what I already do. It's their job to tell developers how Microsoft technologies really work through articles, talks, samples, online chats and whatever other means they think will be effective.
My first interview of day #1 sticks freshly in my mind even two weeks later. It was a guy that I'd most closely describe as a human molecule. I've been told that he's big into coffee and it's not hard to see the effects ? the guy never stops moving! Likewise, his brain was constantly moving. He had all kinds of interesting questions about how I would turn my product ideas (created on the spot) into compelling educational materials of Microsoft technologies. Very fun.
I had several other fun interviews that day, all with smart people asking really great questions. However, after a few interviews, I was disappointed that nobody was asking me to write any code on the board. Apparently I had enough street cred that this wasn't necessary for me, but one interviewer laughed and said I could write whatever code I wanted on his board if it would make me happy. Another had a strongly negative reaction to the idea that anyone would be asked to write code on a whiteboard, which he considered a supremely unnatural act. In fact, all day long, I had questions that dove into my motivations and my ideas, but none of them tested my technical knowledge at all until the very last interview w/ my potential boss's boss (or my boss's boss's boss ? I lost track). She asked me to solve one thought question, one visual riddle and to write some code on the board. The thought question we talked through, but she threw out leading questions faster than I could come up with my own conclusions (although it was a very interesting discussion). The visual riddle seemed impossible at first, but I solved it in a few minutes. When I showed it to Don Box, he also declared it impossible, then solved it faster than I did (bastard). The coding question showed me just how unnatural it is to write code on a write board (even my simple linked list code had three bugs in it ? doh!). I am *totally* addicted to incremental code-compile-test and at one point even suggested using a goto to avoid erasing half of my code to insert a loop (truly the low point of the day).
Even so, at the end of day #1, I was energized. I'm one of those sick people that loves to be tested, especially if I'm confident that I know the answers. My last interviewer told me that I had done well and we talked about what would happen if I was offered both jobs from the two teams that I was interviewing with. She needn't have worried ? day #2 did not go nearly as well.
The day #1 position was a highly technical position, which I've trained for since I was 12. The day #2 position was a <gasp> marketing position. But is was *so* cool. The job is to take whatever technology MS comes up with that day and make a business out of it. It was so diverse and so different than things I'd done before that I was drawn to it like a moth to a flame. Unfortunately, my answers made it clear that I didn't have anywhere near the background needed for the job. I felt like a new college graduate, trying desperately to match something from my background to what they were asking.
As a measure of the kinds of questions I got on day #2, at one point, I was asked to develop a marketing plan for packaged ice to native Alaskans. "Did you just ask me to sell ice cubes to Eskimos?" I asked. "Uh, yeah," he agreed. This was during lunch. And it wasn't the hardest question I got! By my last interview, I was so scared that they might actually offer me the job and that my brain would explode trying to do it that I confessed that I was definitely not the man for the job. However, that didn't stop my potential boss from drilling me on how to make a business on one of my sons' hobbies (about which I know almost nothing).
Of course, I never clicked with anyone on the team from day #2 (you can't click with someone that thinks you're ignorant). However, the experience was amazing. One of the interviewers had a fabulous technique that I just had to appreciate -- he had me role-playing in various real-world Microsoft-related situations over and over again ?til I swear my ears were bleeding. I'm a big fan of behavioral interviewing instead of role-playing as an indicator of someone's real skills, but watching him put me through the ringer was a thing of beauty.
Speaking now from experience, I'd have to say that the Microsoft interview process is all about finding the right fit. That's the case with all interviews, of course, but Microsoft seems to be very good at it. The fit includes both technical savvy (which they seemed to assume in me) and personality relative to the team. I fit very well into one group and not at all well into another. Working with the day #1 group would make me a successful part of the Microsoft machine, whereas if I had mistakenly gotten the job associated with day #2, I would have been set up to fail. So, if you are turned away from Microsoft, it means that you wouldn't do well there. That's a good thing to know; you certainly don't want to take a job at which can't possibly be successful. I know I don't.
My Dad's All Set to Work At Microsoft
Tue, Apr 22, 2003
My Dad, a long-time draftsman in a civil engineering firm in Fargo , ND , had this to say about manhole covers:
"It's like this. Sanitary manhole covers are usually round (and solid, i.e. VERY heavy) but Storm sewer manhole and Inlet covers are usually square or rectangular grates which let water in. The deciding factor is where they are placed relative to the curb line. All covers are actually installed on a concrete generic 'Mexican Hat' structure which can be centered or offset to one side. The structure fits on the round concrete casting (5' - 8" diameter) and can be made to accept any solid or grated casting. If this part of the world, where river flooding is fairly common, Sanitary manholes and lift stations are either raised above potential flood limits if possible or sealed and bolted shut, making them much more difficult to open. It's also a very good idea to vent Sanitary manholes and lift station with a portable fan to avoid being overcome by methane and other gasses trapped in them."
Anyone wonder where I got it? : )
The Human Side of Microsoft
For more than a year, I've had a request to video tape an interview at Microsoft up on this page. The goal was to show the human side of Microsoft by showing that one of their most famous practices isn't something to be scared of. I never expected that I'd actually get to tape an interview. In fact, I expected to be ignored by Microsoft altogether.
Of course, as the most juicy litigation target in the world, and especially sensitive to legal issues, Microsoft couldn't grant my request. That didn't surprise me. What did surprise me is how hard that they tried. In fact, all kinds of folks at Microsoft -- from engineers who wanted to interview me to managers who wanted to help make it happen to HR folks who went to legal to ask -- all kinds of folks at Microsoft really did *try* to make it happen.
So, while I'll never be able to put a recording of an interview up on this site, I can tell you that my mission to find the human side of Microsoft was a success. All of the people I've encountered there -- whether trying to let me tape an interview or taking my feedback on whatever technology I'm working that day -- all of the folks that I've encountered at Microsoft really *care* about doing the right thing. They want interviewees to succeed. They want to build the right products. They want to meet their customers' needs. And as much guff as I give them (they are a juicy target), by and large they succeed. I wouldn't spend my time with their technologies if they didn't.
With that in mind, I withdraw my request. I'm seen the human side of Microsoft. Thanks for showing it to me.
If Richard Feynman applied for a job at Microsoft
Interviewer: Now comes the part of the interview where we ask a question to test your creative thinking ability. Don't think too hard about it, just apply everyday common sense, and describe your reasoning process.
Here's the question: Why are manhole covers round?
Feynman: They're not. Some manhole covers are square. It's true that there are SOME round ones, but I've seen square ones, and rectangular ones.
Interviewer: But just considering the round ones, why are they round?
Feynman: If we are just considering the round ones, then they are round by definition. That statement is a tautology.
Interviewer: I mean, why are there round ones at all? Is there some particular value to having round ones?
Feynman: Yes. Round covers are used when the hole they are covering up is also round. It's simplest to cover a round hole with a round cover.
Interviewer: Can you think of a property of round covers that gives them an advantage over square ones?
Feynman: We have to look at what is under the cover to answer that question. The hole below the cover is round because a cylinder is the strongest shape against the compression of the earth around it. Also, the term "manhole" implies a passage big enough for a man, and a human being climbing down a ladder is roughly circular in cross-section. So a cylindrical pipe is the natural shape for manholes. The covers are simply the shape needed to cover up a cylinder.
Interviewer: Do you believe there is a safety issue? I mean, couldn't square covers fall into the hole and hurt someone?
Feynman: Not likely. Square covers are sometimes used on prefabricated vaults where the access passage is also square. The cover is larger than the passage, and sits on a ledge that supports it along the entire perimeter. The covers are usually made of solid metal and are very heavy. Let's assume a two-foot square opening and a ledge width of 1-1/2 inches. In order to get it to fall in, you would have to lift one side of the cover, then rotate it 30 degrees so that the cover would clear the ledge, and then tilt the cover up nearly 45 degrees from horizontal before the center of gravity would shift enough for it to fall in. Yes, it's possible, but very unlikely. The people authorized to open manhole covers could easily be trained to do it safely. Applying common engineering sense, the shape of a manhole cover is entirely determined by the shape of the opening it is intended to cover.
Interviewer (troubled): Excuse me a moment; I have to discuss something with my management team. (Leaves room.)
(Interviewer returns after 10 minutes)
Interviewer: We are going to recommend you for immediate hiring into the marketing department.
Keith Michaels
krm@sdc.cs.boeing.com
Interview Synopsis
From Fred (not his real name):
So the interview was rough, as to be expected. Here is a synopsis:
10:15-10:45 - Met with my recruiter. Discussed what day would be like and talked about the two teams I would be interviewing with: the CLR team and the Enterprise Services team.
11:00-12:00 - Enterprise Services Interview: Discussed High Performance systems and Enterprise Service standards. Programming problem: Design and Implement a self-managing Thread Pool class.
12:00-1:30 - CLR team Lunch interview: Discussed Security in the CLR and PKI. Programming problem: two fixed length buffers padded with nulls. Swap and reverse them, not swapping and reversing nulls.
2:00-3:00 - Enterprise Services interview: Discussed VS.NET. Design a function to select the six strongest stations for a car stereo.
3:30-4:30 - CLR team interview: Implement strpbak. Common Parent for two nodes BTree problem.
Feeding the Engine
Adam Barr, 4/4/02
On October 26, 1999 , it was announced that Microsoft would be one of the four new components in the 30 stocks that make up the Dow Jones Industrial Average. This as a long-overdue recognition of the role of technology in the U.S. economy, and in particular of Microsoft's central place in the industry.
But Microsoft was different from the other three newcomers. It has no computer chip manufacturing plants like Intel, no chain of retail stores like Home Depot, no network phone lines like SBC Communications. Indeed, it's not "industrial" at all. Its product is software; its assembly line the brainpower of its employees. And while companies across America would naturally say their employees are vital to their success, for Microsoft in a large sense the employees are the company.
And that makes Microsoft very particular about who it hires.
[ read the rest online ]
Tough Interview
Chris Sells, 2/19/02
I woke up this morning with a splitting headache. Just before I woke, I was dreaming that I was interviewing at Microsoft. They held nothing back. It was a group affair with several role-playing scenarios to see how I would handle them. At the end, they threw a mock wedding and sat Tate Donovan (Joshua from the Friends TV show) right next to me while he pretended to be a loud, drunk uncle. I ended up dragging him outside into the street and when he pulled a knife (he was also a Vietnam vet, apparently). I was able to get in one good shot before he "killed" me. Later I attempted to save face by explaining to Tate that I would've done better, but I was afraid to hurt him. Tate looked at me as if to say, "At Microsoft, we don't hold back." Tough interview.
Smart is Not Enough
Here's a recent Fortune magazine article about the MS interview process and the culture. Scary...
Reaction from Microsoft
Here's a quote from an anonymous source:
"I was given your page address from a friend who happens to work at Microsoft and does interviews. He has told me that Microsoft has told all its interviewing employees to keep an eye on your page for ideas and thoughts."
Figures. I set out to help the interviewees and I end up helping the interviewers. Is there nothing that Microsoft can't leverage for their own benefit?
More Reaction from Microsoft
I've heard from several of my friends at Microsoft (and yes, I do have some...), that Microsoft is not such a terrible place to work, but nobody puts it better than Mike Byron :
"Huh. Ran into your Web page about Microsoft. I gotta comment on one thing I saw there:
'Over the years I've been collecting interview questions from Microsoft. I guess I started this hobby with the intent of working there some day, but now that I have a wife and two kids, that's pretty much out of the question.'
"Baloney. I've been working at Microsoft for almost 5 years. I have a wife and twin 7-year-olds. I have an active church life. I work around 40-45 hours per week, and have for the whole time. I have a GREAT time at Microsoft. I'm a veteran of Silicon Valley . Been creating mostly systems software since 1977. Microsoft is no different from most Silicon Valley companies --better hours than most startups, more driven than HP. I do work an occasional 50-55 hour week close to ship time.
"Now, there are people that work here with completely different stories. But I am in no wise unique. I have lots of friends in basically the same position -- 40 hour weeks."
Thanks for the quote, Mike. I'll try not to get you into "trouble..."
Contacting Microsoft
If you'd like to beg Bill directly for a job, his email is billg@microsoft.com . If you'd actually like an answer some day, send your questions to askbill@microsoft.com .
.written test round It is of 2 parts 1. Technical Round basically Questions from C, C++, Java) You should be confident in oops concepts. 2. Aptitude Round General practice questions from R.s agarwal . Each section will have its own cut-off . Microsoft Placement Papers | Microsoft Interview Procedure | Microsoft Aptitude Questions | Microsoft Technical Questions | Microsoft Interview Questions 2.G.D Round . they will give you a topic . The group may be around 8 or 6 depending on the crowd . say best points when your turn comes . say some thing which is new there at that time . Then you can definetely go through it .
1) Written test of one hour Aptitude questions and in same section some puzzles asked like make 4 lines in 3 by 3. dots by covering all the dots. something of these sort will be asked. Microsoft Placement Papers | Microsoft Interview Procedure | Microsoft Aptitude Questions | Microsoft Technical Questions | Microsoft Interview Questions Next c-language . in this asked tricky pointers questions and some questions based on short circuit evaluation etc. individual cutoff in both the section. 30% will be selected in this round. 2) Group Discussion This is second elimination round. roughly around 2-3 ppl will be selected among grp of 10. Good communication skills are important. topic given is: Impacts of Internet on Society. 3) Personal Interview. Here mainly they will ask about project. Generaly microsoft will be taking about 30 students for internship during
a year. They will be conducting recruitment process for 4 times a year .
Microsoft Interview Questions
Caution: The following are rumored to be MS interview questions.
Solving them does not guarantee you a job in Redmond .
1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ?
2. You're given an array containing both positive and negative integers and required to find the subarray with the largest sum (O(N) a la KBL). Write a routine in C for the above.
3. Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ]. How about finding both numbers – the duplicate and the missing?
4. Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all. [This one had me stuck for quite some time and I first gave a solution that did have floating point computations ].
5. Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
6. Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
7. Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
8. 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.
9. Give a very good method to count the number of ones in a 32 bit number.
(caution: looping through testing each bit is not a solution).
10. What are the different ways to say, the value of x can be either a 0
or a 1. Apparently the if then else solution has a jump when written
out in assembly.
if (x == 0)
y=0
else
y =x
There is a logical, arithmetic and a datastructure soln to the above
problem.
11. Reverse a linked list. (singly-linked, doubly-linked, … ) Can u reverse a singly linked list using only two pointers?
13. In an X's and 0's game (i.e. TIC TAC TOE) if you write a program for this give a fast way to generate the moves by the computer. I mean this should be the fastest way possible. The answer is that you need to store all possible configurations of the board and the move that is associated with that. Then it boils down to just accessing the right element and getting the corresponding move for it. Do some analysis and do some more optimization in storage since otherwise it becomes infeasible to get the required storage in a DOS machine.
14. I was given two lines of assembly code, which found the absolute value of a number stored in two's complement form. I had to recognize what the code was doing. Pretty simple if you know some assembly and some fundamentals on number representation.
15. Give a fast way to multiply a number by 7.
16. How would go about finding out where to find a book in a library. (You do not know how exactly the books are organized beforehand).
18. Tradeoff between time spent in testing a product and getting into the market first.
19. What to test for given that there isn't enough time to test everything you want to.
20. First some definitions for this problem:
a) An ASCII character is one byte long and the most significant bit
in the byte is always '0'.
b) A Kanji character is two bytes long. The only characteristic of a
Kanji character is that in its first byte the most significant bit
is '1'.
Now you are given an array of a characters (both ASCII and Kanji) and, an index into the array.
The index points to the start of some character. Now you need to write a function to do a backspace (i.e. delete the character before the given index).
21. Delete an element from a doubly linked list (which kind? with a dummy header or without?)
22. Write a function to find the depth of a binary tree.
23. Given two strings S1 and S2. Delete from S2 all those characters which
occur in S1 also and finally create a clean S2 with the relevant chars deleted. (ref. e12.cpp)
24. Assuming that locks are the only reason due to which deadlocks can occur in a system. What would be a foolproof method of avoiding deadlocks in the system.
25. Reverse a linked list??? Question still remains …
26. Write a small lexical analyzer - interviewer gave tokens. expressions like
"a*b" etc.
27. Besides communication cost what is the other source of inefficiency in RPC?
answer : context switches, excessive buffer copying).
How can you optimise the communication? (ans : communicate through shared
memory on same machine, bypassing the kernel _ A Univ. of Wash. thesis)
28. Write a routine that prints out a 2-D array in spiral order!
29. How is the readers-writers problem solved? - using semaphores/ada .. etc.
30. Ways of optimizing symbol table storage in compilers.
31. A walk-through through the symbol table functions, lookup() implementation
etc - The interv. was on the Microsoft C team.
32. A version of the "There are three persons X Y Z, one of which always
lies".. etc.. (also vending machines)
33. There are 3 ants at 3 corners of a triangle, they randomly start moving
towards another corner.. what is the probability that they do not collide.
34. Write an efficient algorithm and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
36. Some more bitwise optimization at assembly level
37. Some general questions on Lex Yacc etc.
39. Given an array of characters. How would you reverse it?
How would you reverse it without using indexing in the array
//do not understand the last part of the question
//not using indexes => pointer arithmetic??
40. Given a sequence of characters. How will you convert the lower
case characters to upper case characters. (Try using bit vector
- sol given in the C lib -> typec.h) //anything other than
- //c = c - (‘a' – ‘A')??
41. RPC Fundamentals
42. Given a linked list, which is sorted. How will u insert in sorted
way.
44. Tell me the courses you liked and why did you like them.
45. Give an instance in your life in which u were faced with a problem and you tackled it successfully. (oops!)
46. What is your ideal working environment. ( They usually to hear that u can work in group also.)
47. Why do u think u are smart???
48. Questions on the projects listed on the Resume.
49. Do you want to know any thing about the company.( Try to ask some
relevant and interesting question).
50. How long do u want to stay in USA and why?
51. What are your geographical preferences?
52. What are your expectations from the job.
53. Give a good data structure for having n queues (n not fixed) in a
finite memory segment. You can have some data-structure separate for each queue. Try to use at least 90% of the memory space.
54. Do a breadth first traversal of a tree. (print a tree level by level, each level in a different line)
56. Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
(Devise at least two different methods)
57. C++ ( what is virtual function ?
what happens if an error occurs in constructor or destructor.
Discussion on error handling, templates, unique features of C++.
What is different in C++, ( compare with unix).
58. Given a list of numbers (fixed list) Now given any other list,
how can you efficiently find out if there is any element in the
second list that is an element of the first list (fixed list).
//make an array out of it
60. If you are on a boat and you throw out a suitcase, will the level of
water increase?
62. write C code for deleting an element from a linked list (C++)
traversing a linked list
Efficient way of eliminating duplicates from an array
63. What are various problems unique to distributed databases?
64. declare a void pointer
a) void *ptr;
65. make the pointer aligned to a 4 byte boundary in a efficient manner
a) Assign the pointer to a long number
and the number with 11...1100
add 4 to the number
66. what is a far pointer (in DOS)
67. what is a balanced tree?
68. given a linked list with the following property
node2 is left child of node1, if node2 < node1
els, it is the right child.
O P
|
|
O A
|
|
O B
|
|
O C
How do you convert the above linked list to the
form without disturbing the property. Write C code
for that.
O P
|
|
O B
/ \
/ \
/ \
O ? O ?
determine where do A and C go
69. Describe the file system layout in the UNIX OS
a) describe boot block, super block, inodes and data layout
70. In UNIX, are the files allocated contiguous blocks of data
a) no, they might be fragmented
how is the fragmented data kept track of
a) describe the direct blocks and indirect blocks in UNIX
file system
71. Write an efficient C code for 'tr' program. 'tr' has two command
line arguments. They both are strings of same length. tr reads an
input file, replaces each character in the first string with the
corresponding character in the second string. eg. 'tr abc xyz'
replaces all 'a's by 'x's, 'b's by 'y's and so on.
a) have an array of length 26.
put 'x' in array element corr to 'a'
put 'y' in array element corr to 'b'
put 'z' in array element corr to 'c'
put 'd' in array element corr to 'd'
put 'e' in array element corr to 'e'
and so on.
the code
while (!eof)
{
c = getc();
putc(array[c - 'a']);
}
72. what is disk interleaving?
73. why is disk interleaving adopted?
74. given a new disk, how do you determine which interleaving is the best
a) give 1000 read operations with each kind of interleaving
determine the best interleaving from the statistics
75. draw the graph with performace on one axis and 'n' on another, where
'n' in the 'n' in n-way disk interleaving. (a tricky question, should
be answered carefully)
76. I was shown a c++ code and was asked to find out the bug in that. The bug
was that he declared an object locally in a function and tried to
return the pointer to that object. Since the object is local to the
function, it no more exists after returning from the function. The
pointer, therefore, is invalid outside.
77. A real life problem - A square picture is cut into 16 squares and
they are shuffled. Write a program to rearrange the 16 squares to
get the original big square. (backtracking)
78. What is the difference between an Ethernet and an ATM?
13. A character set has 1 and 2 byte characters. One byte characters
have 0 as the first bit. You just keep accumulating the characters
in a buffer. Suppose at some point the user types a backspace, how can
you remove the character efficiently. ( Note: You cant store the last
character typed because the user can type in arbitrarily many backspaces)
14. How would you reverse the bits of a number with log N arithmetic
operations, where N is the number of bits in the integer (eg 32,64..)
15. What is the simple way to check if the sum of two unsigned integers have resulted in an overflow. (why does the algorithm only works for unsigned
numbers? )
Solution:
2. Induction on i:1..n: Maintain the subarray with largest sum and
suffix with largest sum and then update both after adding the
i+1th element.
3. Sum of the numbers or copy i into A[i] so on till conflict.
4. Update deltaY while incrementing x. Have to multiply so that the
deltay is not a floating pt number.
5. Find the largest 10**n less than given number, then div etc.
6. (a-1) xor a == 0 => a is a power of 2.
8. Infinite.
10. Shivku said this question is garbled thru ages.
11. reverse the pointers till you reach the end and print-and-reverse as you return.
12. Have two 'threads' one at twice the speed of the other traversing the list and see if at anytime they meet.
13. Scan the bytes backward till you reach one with the first bit
set to 0. Now this is either a one byte character or the second
byte of a two byte one. Either way it marks a Character boundary.
Start from there and scan forward to find what the last character is.
14. Flip adjacent bits, then flip adjacent 2 bit sets, then 4-bits
and so on. Each of this swap can be done in constant time using
appropriate masks and shifts.
15. if (a+b) < a or (a+b) < b then overflow has occurred
1. Write a function to check if two rectangles defined as below overlap or not.
struct rect {
int top, bot, left, right;
} r1, r2; //
2. Write a program to print the elements of a very long linked list in ascending order. There may be duplicates in the list. You cannot modify the list or create another one. Memory is tight, speed is not a problem.
//ASK questions like what kind of list, and if templates can be used. If //the ascending relationship is defined, etc.
3. Write a function to reverse a singly linked list, given number of links to reverse. (means, the other part will get lost) or we could save the list
append it to the end of the list, i.e. the old head of the original list)
4. Write a function to convert an int to a string.
(itoa, atoi, etc.)
5. Some weird problem on vector calculus with some transformation matrices
being applied - need paper and pencil to describe it.
6. Given ships travel between points A and B, one every hour leaving from
both ends (simultaneously), how many ships are required (minimum), if the
journey takes 1hr 40 mts. How many ships does each ship encounter in its
journey, and at what times?
Ans 4, 3 at 20 mts, 50 mts and 80 mts.
7. Write a SetPixel (x, y) function, given a pointer to the bitmap. Each pixel is represented by 1 bit. There are 640 pixels per row. In each byte,
while the bits are numbered right to left, pixels are numbered left to right.
Avoid multiplications and divisions to improve performance.
8. How do you represent an n-ary tree? Write a program to print the nodes
of such a tree in breadth first order. (and use a queue), not efficient
Ans. Sibling and firstchild ptr
1. Consider the base -2 representation of numbers. (-2 instead of usual +2).
Give the condition for a number represented in this form to be positive?
Also, if P(A, B) is a function that takes two 0-1 strings A,B in this
representation, when can we say that P(A,B) returns the sum of these two
numbers? … if the position of the most significant set bit is odd, the number is negative, otherwise, the number is positive. How do u find out the most significant (i.e. left most) signed bit
2. Given a maze with cheese at one place and a mouse at some entrance, write
a program to direct the mouse to cheese correctly. (Assume there is a path).
Following primitives are given: moveforward, turnright, turnleft, iswall?, ischeese?, eatcheese.
3. Given an expression tree with no parentheses in it, write the program
to give equivalent infix expression with parentheses inserted where necessary. (inorder traversal, the main problem is the traversal, not parenthesizing it)
1. A byte has only one of its bits set. Write the code to find out which bit is
set.
2. You have a long tape which contains numbers from 1 to a 1000 randomly
arranged except for one number which is repeated, your task is to determine
which number it is. The condition is the algorithm you choose should be
implementable in linear time and space.
3. How do u detect a loop in a linked list? (devise at least two ways)
4. You have a singly linked list (no prev pointer). Your current pointer pointing to a node x. Write code to delete x. You can have as many temp pointers as you need.
1. Given two sorted linked lists write code to merge them (so that the final list is sorted?).
4. Given an integer use only putchar to print each num of the int out on the
screen (in order). eg: Given an int 247, print: 2, 4, 7.
5. Write a class for a linked list. Give all the member functions that u would
like a linked list to have, i.e., scan, insert, delete, etc.
6. A pic has a bitmap assoc w/ it and a 256 long array of original palettes.
Now we have a change list, where some old colors are mapped onto new
colors. Write the code to change the original palette. Now if the original
bitmap has to be changed, write the code that will scan the pic as well as
the changed palette array. The code shud be O(N) and not O(N^2). The struct
of the original palette may b changed to accomplish this.
7. If a pic is getting built in one window and a dialog box pops up on top
of it and then disappears. How d'u refresh the pic?
8. If x = a and y = b, how to swap the two var values w/o using a tmp var?
Ans: x = a-(x-y) and y = b+(x-y)
1. Write a class for binary trees.
2. Asked to examine a piece of code and figure out the bug. The trick was to know operator precedence; in particular, the ? operator.
3. SQL queries
4. Networks question: binding to a UDP socket, info about BSD sockets, etc.
5. Why manholes are round? Because they are round.
1. U r given an array. Reverse the array
Describe ur algorithm based on memory and speed.
2. U r given an array which is supposed to contain numbers from 0 to N.
Assume that two of the numbers are corrupted and become zero.
How will u find these 2 numbers? [ O(n) solution needed ]
Keep two variables – sum and product, compare with series and factorial of the entire array
3. Tell me about the most interesting projects u have done.
Recent article: MicroSoft Question
My first interview of day #1 sticks freshly in my mind even two weeks later. It was a guy that I'd most closely describe as a human molecule. I've been told that he's big into coffee and it's not hard to see the effects ? the guy never stops moving! Likewise, his brain was constantly moving. He had all kinds of interesting questions about how I would turn my product ideas (created on the spot) into compelling educational materials of Microsoft technologies. Very fun.
I had several other fun interviews that day, all with smart people asking really great questions. However, after a few interviews, I was disappointed that nobody was asking me to write any code on the board. Apparently I had enough street cred that this wasn't necessary for me, but one interviewer laughed and said I could write whatever code I wanted on his board if it would make me happy. Another had a strongly negative reaction to the idea that anyone would be asked to write code on a whiteboard, which he considered a supremely unnatural act. In fact, all day long, I had questions that dove into my motivations and my ideas, but none of them tested my technical knowledge at all until the very last interview w/ my potential boss's boss (or my boss's boss's boss ? I lost track). She asked me to solve one thought question, one visual riddle and to write some code on the board. The thought question we talked through, but she threw out leading questions faster than I could come up with my own conclusions (although it was a very interesting discussion). The visual riddle seemed impossible at first, but I solved it in a few minutes. When I showed it to Don Box, he also declared it impossible, then solved it faster than I did (bastard). The coding question showed me just how unnatural it is to write code on a write board (even my simple linked list code had three bugs in it ? doh!). I am *totally* addicted to incremental code-compile-test and at one point even suggested using a goto to avoid erasing half of my code to insert a loop (truly the low point of the day).