Picture

Hi, I'm Akhilesh Devrari.

CSE Undergrad, IIT Mandi. Cameras and compilers don't seem to like me. Despite having a lot of other choices, chose only to date life for last 20 years. Life is good :)

Microsoft IDC internship interviews

This is a throwback to a few weeks ago. It’s about how I got selected for summer internship at Microsoft IDC. At last I will write the questions asked in different rounds (might be useful for someone).

So, I spent last few months preparing for internship interviews. As semester started, two companies conducted online tests (which is first round), and I could not make through any of them (life had a better plan for me). Then Microsoft IDC came and this seemed like the last chance for me before I go into some kind of depression.

Online Round

First round, conducted on cocubes. It consisted of 3 coding questions, all were easy. I messed up in second question, but solved the other two. 50% candidates were shortlisted for next round, so this round was a cakewalk for any serious aspirant.

Group Fly

We had to solve 2 questions on paper and discuss our solutions with an assigned mentor. I think discussing solutions with mentor was more important than writing actual code. They selected one-third of candidates for personal interviews (those who could solve both questions).

Technical Interview 1

He: Do you know what ..(gibberish).. is?
Me: I haven't heard of this term.
He: Ok. Do you know what ..(more gibberish).. is?
Me: I haven't heard of this term either.

This is how first interview of my life started (those were some definitions about RDBMS, I can’t even remember those words). I felt like an idiot (should have revised my courses properly). He then asked me few questions about OOP and compiler/interpreter (mentioned on my resume), which I could answer. Then he asked me to write test cases for a simple calculator. I talked about division by zero, overflow etc. He didn’t seem impressed (God knows what he wanted). Then he showed me a code and asked me to write test cases where given code would fail. I did. At last he asked me the standard n-queens problem, (which everyone knows :) ).

Though later half of interview went well, I knew I messed up in beginning. Before leaving I asked him for feedback. His response was that I was being underconfident (what do you expect after such a great start :P ).

I was not sure whether I am making it to the next round or not. But after a wait of few hours, they called for second round (imagine that adrenaline rush, and me talking to myself about being more confident this time).

Technical Interview 2

This round consisted of only coding questions (which was advantageous for me), and the interviewer was nicer. He asked me questions on graphs, trees and strings. I gave optimal solutions to almost all questions. I knew I was doing well and this gave a huge confidence boost. Towards the end of interview, I asked him about his experience at Microsoft and few such questions. It was all nice and good.

HR Round

This was the last round, held on Skype. Once you are in HR round, you are almost hired, just don’t spit something utterly stupid out of your mouth. I took care of that and interview was a cakewalk. He asked me questions like

Why do you want to do this internship?
What was the most difficult question asked to you in interviews?
What projects are you currently working on?
What do you think is the future of technology?

I answered every question politely and with a very positive attitude. Then I asked him how long he has been working at Microsoft and his experience about it. He appreciated Microsoft culture and said some good words (I was too excited to remember those words). Then I asked about how projects are allocated and what kind of work we will doing (again, I knew I had done my part, just smile and let him speak.)

A few minutes after I walked out of that room, a friend told me that I had made it. This was some kind of The Pursuit of Happyness moment for me. And then I happily lived ever after (for two whole days, then college exams happened).

Questions

Online round

  • Given a number, find the smallest palindromic number greater than it. Eg input = 149, output = 151
  • Given a linked list and two numbers m and n. Reverse first m nodes, and skip next n nodes, then reverse next m nodes, and so on.

Group Fly

  • Write string_compare() function for a given set of alphabets. Eg (‘c’, ‘a’, ‘ng’, ‘n’) given in some alphabetical order.
  • Given a binary tree, find the maximum diagonal sum (diagonal from top-right to bottom-left).

Personal Interviews

  • Classical n-queens problem.
  • Move a knight from source to destination on a chess board in minimum number of moves.
  • Given a binary tree, print its top-view.
  • Find intersection rectangle of two rectangles.
  • Compress a string. eg. aaabbccccd will become a3b2c4d1 (do it inplace in linear time).
  • There were few other problems which I don’t remember, but the difficulty was similiar to these only.

Takeaway Points

  • Have a firm knowledge of data structures and algorithms. Practice is the key.
  • Competitive programming helped me a lot to improve my problem solving skills.
  • Solve previous year questions on geeksforgeeks and interviewbit (I liked later one more).
  • Resume matters a lot when you apply off-campus. For on-campus, it was not a deciding factor (at least not for me).
  • Luck plays an important role, but that’s not in your hand. So do best what you can do, whatever happens happens.

The important thing about that freedom train, is it’s got to climb mountains. We ALL have to climb mountains, you know. Mountains that go way up high, and mountains that go deep and low. Yes, we know what those mountains are here at Glide. We sing about them.

--- The Pursuit of Happyness