Asking Clarifying Questions in Job Interviews

August 7, 2006

Asking Clarifying Questions in Job interviews has always been a recommended practice. Some of my friends were discussing their not-so-successful interview experiences and many times they mentioned that they solved the problem only to realize that

  1. Interviewer had asked some other question OR
  2. They had forgotten to clarify each and every case with the interviewer before attempting the solution etc.

I am not a guru in doing this but let us try this out.

When in an interview, before you jump to the solution, you should be absolutely sure that you and your interviewer are both thinking in the same direction. Interviewer asks you to solve a problem. If you dont’t ask clarifying questions, your interviewer will assume that you have fully understood the problem. So its always good to speak out what you are thinking and your interviewer will correct you thoughts are not aligned with his thoughts.

For example, Let us consider a simple (and famous question). I may not be able to identify all the cases (but who cares 🙂 .. after all its just another blog :)).

“You are getting a char* that represents a string. If this string represents a Palindrome, return TRUE, otherwise return FALSE”.

Now, lets us see how can we start solving it.

You don’t have TRUE and FALSE defined. Tell you interviewer that for simplicity, you are defining them as

#define TRUE 1
#define FALSE 0

Tell your interviewer that you could have considered using ENUM BOOL but you are focusing on the problem right now.

Define a prototype as

unsingned int IsPalindrome(char* str);

Also clarify that you are supposing that you will receive an 8 bit char string.

Discuss with your interviewer that you would do the following

if (NULL == str) return FALSE;

if (!(*str)) return FALSE; // Zero Length Strings

if (‘ ‘ != str[0] && !(str[1])) return TRUE; // 1 Character strings (See next point for spaces. They might be considered palindrome or not. If they are considered palindromes, then you can omit ‘ ‘ != str[0] )

Discuss with your interviewer the issue of SPACES.

If your interviewer says that you have to ignore spaces, then

Any string of length >=1 containing SPACES only will return FALSE
Strings like “bbaaa bb” will be considered palindrome and will return TRUE

If your interviewer says that you have to consider spaces, then

Any string of length >=1 containing SPACES only will return TRUE
Strings like “bbaaa bb” will not be considered palindrome and will return FALSE

Suggest your interviewer to change the prototype to

unsingned int IsPalindrome(char* str, size_t length);

So that you can avoid Buffer overruns. Your interviewer will either GUARANTEE that you will always get a NULL TERMINATED string (in order to simplify things) or your interviewer will allow to change the prototype. In latter case, you must change your logic accordingly.

Well, these were some questions that you can ask before solving a problem. After this, things are pretty much clear between you and your interviewer. You can carry on solving the problem after this.

Clarifying questions vary from problem to problem but there are always certain issues that you should clarify before you jump to the solution.

P.S. If someone reading this blog wants to add more questions regarding this problem, kindly do so in the comments section.


Zoe and Gretchen (Ex Microsoft Recruiters) – New Blog

August 4, 2006

This is really exciting. All of us who are fan’s of Microsoft JobsBlog know that it started due to the efforts of Zoe and Gretchen. They have 3 exciting videos as well in Channel 9. Their posts helped me a lot in understanding Microsoft’s recruiting procedure and probably played an important role in my selection.

They left Microsoft and now today I found the name/website of their company.

Zoe left Microsoft for joining Washington Mutual in January 2005.

Gretchen left Microsoft for entrepreneurship in April 2006.

So Zoe and Gretchen are again together in JobSyntax. And how can you think that they can stop blogging. They have a wonderful blog as well. I have read some posts and they are great. And moreover, they do mention Microsoft here and there. So their posts are great for finding IT jobs and can also be read to get some specific knowledge regarding Microsoft. All this is really exciting.


Microsoft International Recruting – “What to Expect?”

August 3, 2006

Microsoft’s International Recruiter Priya Priyadarshini posted a complete description of How International Recruiting works in Microsoft. She has taken the pain to describe Everything you wanted to know about International Recruiting.

P.S. My own experience was no different from what is described in this post.


A Story about Google Interviews

July 20, 2006

My Friend Haroon Saeed is writing an account of his Telephonic Interviews with Google. He is one of the most intelligent, enthusiastic people whom I personally know. Reading this gives you an idea that what you should should expect when in Interview with Microsoft, Google, Amazon etc. You can access his Blog at http://haroonsaeed.wordpress.com.

One more thing. Many people ask me what to expect in Microsoft Interviews. I have only one answer for all of them and it provides almost every information. Visit Microsoft JobsBlog at http://blogs.msdn.com/jobsblog. Read its archives and Download related videos from Channel 9, and you will know each and everything regarding Microsoft Interviews.


Tips for Microsoft Interviews

December 18, 2005

Being interviewed by Microsoft is an exciting experience. You get a chance to meet people who are actually creating the next generation software.

Here are some tips for the interviews (at least they worked for me).

  1. Just be the way you actually are. Don’t act or pretend. I rolled up my sleeves before my first interview as I always do when working.
  2. Try to forget that you in the Microsoft interview. Just think that you are in front of some quality people who want to know about your current knowledge and interests.
  3. If you get a better idea while implementing/solving a problem, keep a note of it but complete your first solution first. Then tell the interviewer that you can now present a better idea. Jumping to ideas again and again might leave the problem unsolved in the end.
  4. Don’t ask too many questions in the beginning about the Team etc. as time is limited. I got to the coding questions late in my first interview and I had to rush. In the remaining interviews, I told the interviewers that I have some questions and they spared 5 minutes or so at the end. This approach provided me with ample time to code and test and ask questions.
  5. Give as many ideas as you can. Even if idea doesn't make sense to you, you interviewer might be interested in listening it. Almost 4 times, I thought that some idea is not a good one but I spoke and it turned out that interviewer wanted me to talk about that.
  6. When suggesting a data structure, be ready to DEFEND your opinion. Even if you have suggested the best data structure, your interviewer would like you to compare it with other data structures and discuss their advantages and disadvantages.
  7. I never got a single Riddle/Puzzle question in my 5 hour interviews. It doesn't mean that you will not get one but it certainly shows that don’t waste your precious time preparing for puzzles.
  8. Talk, talk and talk (obviously listen to your interviewer as well).
  9. Suggest improvements in given function prototypes. Sometimes they are intentionally flawed to see if you can find out the flaw or not.
  10. While writing test cases, keep in mind that your code should verify all of them. If you find a test case that you have not handled, tell this to your interviewer straight away. Also suggest modification in your code to handle this test case.
  11. Don’t skip the test case that you have not handled as your interviewer is likely to suggest this test case. In case of avoiding, you are showing your incapability. First you coded a problem and you were not able to tackle a case. Then you again analyzed the problem and were still not able to identify a valid test case. So it’s -2 instead of -1.
  12. When in doubt, ask your interviewer to explain.
  13. If you don’t know something, simply tell your interviewer. Your interviewer will appreciate it and will try to explore your knowledge in some different domain.
  14. Even if interview is not going good, don’t get frustrated. May be your interviewer has intentionally given you a tough problem and would like to see if you lose heart or not
  15. Keep faith in God and in yourself.

Microsoft Interviews in Dubai

December 13, 2005

I'm back to my blogs after a long long time. During this period, a lot of things happened.

  1. I completed my course work at the university.
  2. I got a job in a very good software house i.e. Palmchip Pakistan(www.palmchip.com).
  3. And now I got selected for Microsoft.

Today I received the email that I have been selected as an SDET in Microsoft in Microsoft Exchange team. I was interviewed for MS in Dubai last week(Dec 9, 2005 to be precise). I am very excited about it. Thanks to all who prayed for me.

In the coming days, I'll be posting that what happens during the interview process at MS.

For the time being, please pray for me.