Dec 8, 2006

Microsoft Interview Tips!

Of course since I'm a SDE, I'll talk about tips for SDEs or SDETs interviewing for MS..

Tip #1. Do u love Microsoft?.. want to join MS? why?
U really have to think why do u want to join MS and do u have the passion for technology or what it can do?!.. that's a question u need to ask urself!. Try to read more about Microsoft.. have u heared about something called the green house?.. try to do some homework about the company that u wish to join.

#2. SDE or SDET?.. Prove it!
CODE, CODE, CODE, CODE... U really need to write a lot of code on paper.. think on paper!.. remember there won't be a PC in the interview process, u'll be asked to write a lot of code on paper.. Test and debug your code.. Think, be creative!.
Optimizations.. From now on, whenever u write a piece of code, optimize it.. was it O(n^2)?.. make it O(n*log n) by some sort of binary search or something.. did u do it?.. Why don't u start using pointers, get a handle to the whole input or something, and maybe u'll be able to optimize it to be O(n)!!!

#3. Your CV... 95% Your interviewers will have your CV while interviewing you.
Everything in your CV, U must really know it.. Know ur CV..

#4. It's not all about how much u already know!.. It's about how much u r ready to learn.
It's about ur ability to develop.. and believe me it's totally true, I'm here and I c it myself!.. People in Microsoft have the ability to recognize who have this ability and who don't!.

#5. Communication!!.. how do u communicate with the interviewers?, do they understand u?.. did they get what u really want to say?.. do u understand them?.. how good is ur english?
If your english is not that good, u still need to communicate with ur interviewer, u still need to show him how good u r!.. So, If you didn't understand a question or part of it, after the interviewer finishes, ask him to repeat the question again.. It's really OK to ask, and believe me it's much better than answering a whole different question!. u still need some data?, talk with the interviewer.. Communicate with him!!.. if ur english really doesn't help u, then after u have been asked the question, try to have like 10 sec. or something to put the answer in place in enlgish, and then say it, try to avoid hesitating or talking then stop, then talk again, then stop!.. it makes the interviewer feels that u lack some confidence, and its a kind of miss communication too!.. Ur interviewer might be ur team lead, or team member!, so If u can't communicate with him, he won't be sure to accept u!.

#6. Be ready for the interview!.. u really really need to study very hard!.
Solve all types of puzzles u c.. Data Structures, u have to be able to write full classes of a linked list, trees... etc. on paper!.. what's a stack?, how to test it?.. etc. Searching in a string, string operations, binary search... Sorting, all types of sorting, did u know that there is a sorting algorithm that sorts an array of integers in O(n)?.. read about it, it'll open ur mind to code optimization.

#7. No matter how many questions u've read, no matter how many interview questions u have read... Get ready to c whole new set of questions in ur interview!.
Don't get surprised or afraid from any question.. always expect that u r going to be asked a new question!.. go step by step.. Don't be afraid.. no matter how u think this question is hard or un-solvable. IT IS!.. just start collecting small info, write them down.. go another step forward.. just a small one... U 'll be there!.

I hope u'll remember all these tips, make sure u do them!.. about what to wear, u r free to wear anything!, ur interviewers might be wearing shorts!!. so wear whatever is comfortable.. for example I was wearing a black trousers and a grey T-shirt.. just whatever makes u stop thinking about it!..
I guess that's all what anybody should need in a Microsoft interview!.. but really if u have any questions or need some help with some specific thing that I missed or anything that u have in mind, u r free to leave me a comment and I'll be more than glad to answer or help!.. Hope to c u soon in Microsoft Campus!

23 comments:

Ali Abdin said...

Great Tips Hany. I think you hit a lot of them right on the head.

Microsoft does ask a lot from its potential recruits, and this is justifiable as they produce some of the best, most popular software out there. Contrary to what people may believe, there is a high quality level to everything that we do.

One thing we face on the WinSE team is that if we make one mistake, it will be instantly deployed to millions of people.

So you got to be good. You got to be smart. You got to be good at code. You got to be able to learn very quickly and be able to ramp up fast. You got to be able to learn new things and even contribute new things to the team. You got to be able to communicate effectively (what is the point of being good if you can't get your ideas across). You have to be a good team player. You need to have passion and drive (I've seen so many programmers that are not passionate about what they do and really don't care).

So anyway, there is no silver bullet I think for the MS interviews. So many people ask "how do I prepare for the MS interview" - and I think we tell them the traditional things (read X, Y, Z - study this, and that, etc.) But this, I believe is half the battle. The other half is convincing your interviewer that you belong on the team (and you do this by showing your passion, and communicating your ideas effectively with your interviewer).

Hope this helps the people who will be interviewing very soon for MS in Egypt :)

Fathalla said...

thanks for the precious comments, i am going to the interview here in Cairo this Tuesday, id3ooly, i really hope i meet you soon. By the way, where is the algorithm that sorts an array in O(n)

Ahmed Fathalla

Ali Abdin said...

I believe you should take a look at Counting Sort. But keep in mind, this sort is not applicable in all cases (I believe it only works if the data you are sorting is numbers). Keep in mind, its not only about knowing the algorithm - no one will ask you "write me an O(n) sorting algorithm"

More likely they will ask you a real-world problem, whose solution can use any sort and its up to you to use the best one :)

Hany Barakat said...

Here is the link for the counting sort: http://en.wikipedia.org/wiki/Counting_sort
The numbers to be sorted have to be positive integers only.
But as Ali said, No one will ask you to sort an array!.. it's a part of the problem.. I only wanted u to look at the algorithm coz it's just an algorithm to let you open your mind for possibilities!... hope the link could help you!. and if u need anything just ask!.

Hany Barakat said...

well, to be honset, myself, I don't remember I ever read a whole book of algorithms or something like that!.. but instead I keep on searching the internet for any free algorithm book or writings or something.. but I lost all my favorites with my last laptop, but it was something like this link: http://www.cs.sunysb.edu/~algorith/.. try searching for more.. and I also found this gr8 info on the Wikipedia.. which I think is really nice to find any info u need:
- http://en.wikipedia.org/wiki/Category:Algorithms
- http://en.wikipedia.org/wiki/Category:Data_structures

There is really alot of information in these links I gave to u, u might not be able to finish everything by the ime u want if u have an interview soon or something.. but at least try to read the important algorithms, and data structures.. Linked lists, trees, Dynamic programming, greedy algorithms, searching and sorting algorithms.. etc.
Hope these helped!.. Thx.

Mohamed Moshrif said...

Actually count sort can work for negative numbers too by a slight modification, but in this case you'll shift the negative numbers to be positive and then shift them back to be negative, i.e:

range is from -5 to 20
make it as if it's from 0 to 25

Sort the array, and then you know that you shifted that array by +5, then when you're going to put the numbers back, subtract 5 from each one and then put it inside its place, i.e.:

sorted[ --counts[ A[i] + 5 - min ] ] = A[i] - 5;

Don't forget to add 5 into the calculations for the creation of the count array, it's just shifting left then shifting right, nothing more.

Mohamed Moshrif said...

I can recomment you a couple of books in Algorithms and Data Structures which are used in University of Washington, and I read in them myself and found them very good:

Data Structures:
Fundamentals of Data Structures in C++

Algorithms:
Algorithm Design


There should be more than enough to cover all the basic and known generic Data Structures and Algorithms

Mohamed Moshrif said...

Ohh, one more thing, you can find more than one book with the titles I gave you, the ones I mean:

Data Structures:
Fundamentals of Data Structures in C++
By:
Ellis Horowitz
Sartaj Sahni
Dinesh Mehta


Algorithms:
Algorithm Design
By:
Jon Kleinberg
Eva Tardos

Anonymous said...

" No matter how many questions u've read, no matter how many interview questions u have read... Get ready to c whole new set of questions in ur interview!."

abe dhakan(see hindi dictionary for the meaning),
if new q's are goin to be asked, then why the hell shud u do as many probs as possible,,,,a lil bit here and there shud do right,,,,wasting ur time and askin ppl to do the same..
duh!!
VB

Hany Barakat said...

@VB... :-) I won't look at a Hindi dictionary (I just hope it's not an insult!)... Also I believe that Indian’s speak different languages depending on their district...
Anyway,
Alashan heya msh fahlawa (see Arabic dictionary for the meaning).
What’s really important about this tip is, not to get surprised! Some people just count on solving many problems hoping that only these puzzles are to be asked! It’s not, new puzzles and problems are going to be asked, get ready for it! How? By knowing how to think, I believe solving many problems and knowing a lot of algorithms is the key for that, everything comes with practice! Practice more and u’ll be able to solve problems that u have never seen before! Why? Because it just looks like a problem u have read before, yes both can be answered using almost the same algorithm, just a simple modification here and there and u’ll do it! It also doesn’t mean that u can’t be creative, be creative, try creating a new algorithm, but I’m quite sure that knowing more algorithms and problems will help u even to be more effectively creative!
Because it's not about questions! Didn’t u get it yet? Do u really believe u r going to be accepted coz u know more question's answers than others do? u only get accepted coz u r smart enough to! Reading many questions, solving problems and puzzles opens up ur mind for the way of thinking, after a while, u'll c that almost all problems are the same, they are all just variations of the same algorithm! What you need to do is, know the algorithm and know how to start thinking! And never expect that u r going to be accepted coz u memorize the answers of specific questions!

Ali Abdin said...

Well anonymous...I agree with Hany here...

I studied quite a bit for my MS interview. But it wasn't only because of my MS interview. I read several books which I found very interesting, and opened up my mind to a lot of new things (e.g. Code Complete, and Art of Software Testing). Without reading them, I would never have been exposed to the ideas in them.

As for solving several problems. It puts you in the mindset of solving problems that MS will ask. If you can solve many of these 'practice' or 'sample' questions, you should do fine on the actual interview. I won't link to them, but there are many sites out there that list technical programming questions similar (sometimes identical) to what MS asks. Also, through solving these problems, I did learn a lot. For example, I learnt about Counting Sort which I then used in my interview. Plus, I found it exciting and fun trying to figure out the solution to these difficult problems. If you find it "too much" or a "chore" then you might not have the right mentality to want to work at Microsoft.

Take it from two guys who went through the process and now work at Microsoft. The more problems you solve, the better prepared you will be for the interview, and the greater chance for you to be accepted. I know several people who blew it off or thought they didnt need to study that much for the interview - Guess where they are?

And just so you know - I am not saying studying will get you in. That alone won't, there are many other factors. But studying WILL help you.

Hany Barakat said...

Yes Ali That's true, Also VB, How could u ever consider solving more problems, reading and opening ur mind to new ideas as waste of time! That’s something u r not going to lose forever! U might not get accepted in MS interviews, but at least u got new information and experience for the rest of ur life! It's just like coding; there is never enough of coding! U'll never write the same application again, but writing a lot of code will defiantly help u when u r planning to write a whole new application!

Mohamed Moshrif said...

The most amazing this when I remember my interview, I never studied for 1 minute, I never got initial email questions, never got puzzles or IQ questions, it was really short :D

Hany Barakat said...

@Meshref - But u have been studding for ACM anyway! u already knew many of algorithms and programming techniques! So it's all about getting ready, maybe u didn't study specifically for the interviews, but u was always reading anyway!

Anonymous said...

Hi Hany,

Are we required to know C++ to get a SDE job at Microsoft? Is C# enough?

Thanks.

Hany Barakat said...

Hi Ron,
Actually, you are not required to be experienced in C++... you just need to know basics... Basics which are common among all programming languages... ex.: virtual functions, delegates (pointers to functions), friend classes... etc.
It doesn’t matter if you are more comfortable with C++, C# or even Java! As long as you'll be able to answer the questions and write the pseudo-code that is supposed to solve the problem, then that’s it! That's all u r required to do, just solve it with whatever programming language that u feel comfortable with.
In the matter of fact, I’m not experienced in C++, I only studied C# in college and just basics for C and C++… So, if I can do it, so can you… Go for it, study hard and good luck… If you need anything I’ll be more than glad to answer you… Thx.

Anonymous said...

Thank you very much for the post and the tips. I was searching the internet and was lucky to stop by this blog. I wanna share with you a website I run across http://www.technical-interview.com which list some interview questions.

Many thanks

Hany Barakat said...

Thx a lot for sharing the website with us... I took a quick look on it, and it looks interesting... Take a look also at:

- http://www.softwareinterview.com/
-http://blogs.msdn.com/heatherleigh/archive/2004/04/19/116110.aspx

Thx again, hope u do well in your interview... Thx.

Unknown said...

Fundamentals of Data Structures in C++ (by Ellis Horowitz and Sartaj Sahni)
download link:
http://mihd.net/hmx2kr

Anonymous said...

First of all. Thanks very much for your useful post.

I just came across your blog and wanted to drop you a note telling you how impressed I was with the information you have posted here.

Please let me introduce you some info related to this post and I hope that it is useful for community.

Source: Microsoft interview questions

Thanks again
Ngo

Anonymous said...

You have really great taste on catch article titles, even when you are not interested in this topic you push to read it

Anonymous said...

I didn't understand the concluding part of your article, could you please explain it more?

Shibashish said...

thnks for all the tips. i was thinking that knowing most of the the technologies will help me to get into MS. But its actually lies in how think of a solution for a perticular problem and knowing many algorithms ll definitely enhance ur thinking ability of solving a problem...thnks for everything...since i m just a developer working in TCS having very basic knowledge of coding in .net. going forward i will definitely take care the of the above points to prepare. after all MS is my dream