Sunday, April 8, 2007

Microsoft Interview Questions

Finally, they are here.....

A tad bit late, but here nevertheless....
I was worried initially abt revealing the questions....cos I was all set to go there... but now that I have changed my mind.....it doesn't matter....

I reached Seattle on February 1, 2007 at arnd 8 pm. I reached Courtyard by Marriott at around 8:35. Settled in, had a light "junky" dinner, and practised some code till abt 12 am, I guess.

My interview was scheduled to start at 11:30....a bit lucky cos that meant an easy start to the morning and the lunch interview to begin proceedings... I had a heavy breakfast, stocked up on some cereal bars, and practised some more code and left for One Microsoft Way at 10:30. The cab ride was just 10 minutes....and I reached the main reception at Building 19 a whole 45 minutes ahead of time. The receptionist gave me a lowdown of the administrative and infrastructural stuff and then I waited for my recruiter to come and meet me in the lobby. My friend kept me company on phone...and helped me a lot with some useful last minute prep....

11:15 first interview... type : HR, with the recruiter.

Just verified some stuff off the resume, asked if I had any offers....then asked why Microsoft....gave me a goody bag. Explained the day's schedule, asked me abt all the hype surrounding the interviews...and then directed me to the recruit shuttle. On the way we talked a lot abt life, my hobbies, sports I play and stuff....I decided to be extremely friendly with everyone I meet that day....

Aside: The interviews are well planned....but it's a relay setup. I just knew my first interviewer and his location, he would tell me abt the next guy and so on....

11:30 Recruit shuttle to Building 50 something....

11:40 Interview 1 At building 50 something...wait till Mr Mn Fg meets me in the lobby. All the waiting actually hepled me calm my nerves, but cd work the opposite way too. Very genial and welcoming Asian 45+ man. Test lead/manager for the Windows admin team. Amazing guy to have as ur first interviewer.... plus a Lunch interview...the atmosphere was very laid back and friendly. It was almost like a homecoming, interacting with him. The interview was a hybrid tech HR one with loads of pauses for eating. I could choose anything I wanted, but I went for a simple Indian rice+subji combo. If I had to redo this, I would have eaten only fruits. Now I'm a slow eater...especially wen I'm talking...so my meal was not ending at all....Mn Fg was extremely patient and we interacted like team mates
Questions: Strengths with examples/illustrations. Weaknesses with examples/illustrations. Team work experience. Life at Microsoft....suddenly out of the blue difference between int ** ptr and int * ptr. Then teh difference between NULL and empty string. Then back to some stories....and I was extremely attentive...also helping him complete some sentences... geeky techie discussions.

We then went up to his cube/office where he realised that there was very little time for a full fledged techie interview and asked me one simple question: Write a complete C program to find string length. Wow.... a sitter for q1... it really felt like my day from then on in....

I kinda cracked that q.....the key understanding was being able to differentiate between null and empty strings....which he really liked. He then asked me to write test cases for the same. I did that...and then he said, well if u had to use just 3 test cases which ones wud u use....and if u had just 1 which one wud u use? I guess I answered that satisfactorily too...and that was the end of interview 1...I'd rate it as a 85-90/100. On my way out he showed me a trophy with all the releases he had been a part of engraved on it (14 in all) and handed me a Vista frisbee....


1:30 Interview 2 Same building, 6/7 offices away from Mn Fg, Mr Ml.... he is another guy in Mn Fg's team, same age as me....another extremely friendly guy, started off with questions on my projects.... then the tech interview started

Q1 Write a program to find the number of 1's in the binary representation of an integer. Is there a faster method if we use characters instead of integers.

Q2 Implement a lease and release mechanism. When the caller calls lease it returns the smallest avaialable integer from a range. On release the number become available or leasing again. So for eg if 3 clients call lease thrice it would give 0, 1 and 2. Then if the client recieving the 1 releases it and some one calls lease again it shd return 1 and not 3.

I took some time on Q2...but I finally nailed it. He also asked me test cases for both questions as well as a way to automate the testing....


I would rate myself a 75-80/100 on that one.

3:00 Interview with Mr Ai Ni

Started slightly late....another impressive personality... Test lead of the Windows Update backend pipe team. We went right into the interview:

Q1 Why Microsoft? Does the test team play a major role....how can they have a stake in the ownership of the product. Give an example where u fixed a bug...that stumped several ppl....and how u debugged it...(working in the industry gives u an edge ...with such questions....) this part went well

Q2 I have a process which gets a lot (several thousands) of numbers in the night...I need to store it in some data structure, I have the whole night to do it...(so enough time for insertion) but I need to retrieve it the next day in very little time, how do I go abt doing this? Answer Obviously hash table...discussed hashing and rehashing..... we were heading toward a dead end...so he decided to give me some more time for retrieval...so I said binary tree....then he said what's the worst case... I said linear for a lopsided tree, so then wat? Balance the tree....so he gave me some test cases and made me write a balancing algorithm, which I think I wrote well....and he was quite happy with it....then he asked me if I had any questions...and I asked him if they use low level tree implementations in code at all....and he said well yes and no....and it was more a test of my thinking abilities rather than knowledge.....

I'd rate myself a 70-75/100, due to the hash table impasse


Interview 4 4:30 Mr Ty Ln, Ai Ni's manager.....probly one of the nicest ppl I've met....

I was tiring by this time...and it was 4:30 on a Friday...I remarked to Ty as we walked to his office...that I was sorry to keeping him from leaving early on a Friday evening....and he just laughed it off....we entered his office and almost immediately he drew an AND OR and X-OR gates on the white board and asked for their truth table.....now I'm a EE undergrad and I teach Logic to undergrads.....even if I were asleep....I shd be able to answer that....so I did...then he drew an opamp and fumbled with the inverting and non inverting configs....I corrected it for him... i remembered stuff that I'd done almost 4 years back....and the he asked me...wat wud happen if there were no feed back...and I said it wud be just liek a gate...and that was the answer he was looking for....he smiled bk almost mischievously....'are u surprised'...and I say of course I am....and he says well he has a EE back ground too....so we start off the interview on a good note....

Q1 Test the travelling salesman problem...Given a set of input coordinates, return the optimal path covering all points and back. i worked up some good test cases....actually all except one which I briefly alluded too...I knew I had forgotten something....and he sensed it and asked me if it wud be a problem if we just went ahead without it...and I said well yes and no....so he told me that one shd consider positive and -ve infinity as 2 points....

Q2 Write an optimal program given an array a of integers and length l to remove the duplicates and return the new length... I nailed that...and he did not ask me to speed it up...

it was almost 6:30 now...and he said 'well that's the last question I will ask u today'.... and he called me the shuttle to go back to Bldg 19...and then I went back to my hotel....after almost 7 hours of interviews....

I wud rate that interview a 85-90/100

So my overall rating would be arnd 82....which I wud say was pretty good for a non CS undergrad...with little preparation....I was pretty confident...and when I reached Austin...I was mailed by Mn Fg (instead of the recruiter) on Tuesday asking if I had heard from the recruiter abt his team's offer. Later that dy I was mailed by Ty Ln, that he was coming to Austin, and wanted to know if I cd meet him over dinner....

Well that meant an almost yes...and I did get an offer on Friday, a week after the interviews from my recruiter....


Everyone....each and everyone of my interviewers impressed me....and I feel sad at having missed the chance of working with such brilliant individuals.... but then Google is Google....my dream company....and I know I will be happier there....


Well more abt that interview some time later...for now its good night and shabba khair...and please take good care of urself....

Saturday, April 7, 2007

Wellness

I had written this quite sometime back (4/7/2007), and I believe the power of posterity always allows you to show emotions you din't mean to express at the time they originated...so here goes...

Pull and Push
To and Fro
We go

At times loud
At times silent
On and off

Strangely still
We manage to steal
Our share of happiness

A laugh here, a pout there
A warm word expressing care
Time well spent

Wellness
Is a thing of body and soul
They say

For me though
Its with you
At this moment here

Achievements, rewards, credit and gain
Make me happy, but then again...
Matter little for I know its true

I'm truly well with you...

Tuesday, April 3, 2007

Surreal

This feeling that I get
When things seem as if in a dream
When yearnings come true
As if they were always meant to be
Complications simplify
Leaving me to wonder why
They were ever a worry
I'm scared...though
All ups have downs
Lurking nearby
Hope I don't get carried away
By this dreamy phase
And have my feet on the ground
With joys abound
Surreal
It's what I feel


Google today confirmed the receipt of my acceptance of their offer. Complicated line rite. They also asked for my preferred user name, computer name and tee size.
Surreal
Is what I feel....

meebo