Posts Tagged Dubai Interview

How to Test a simple Calculator Interview Question

This is a very common interview question and was very much expected when I appeared for my telephonic interview with Microsoft! And as expected I was asked this J “How would you test a calculator that does basic operations like addition, multiplication, division, subtraction and square root.

So here is a reasonable answer to ace this question. Testing formally is divided into two broad categories Functional testing and Non-Functional Testing.  To be very honest interviewer is NOT interested in how much you know about different types of testing rather they want to see how you’re thinking pattern works.

A model answer to this question can be as follows:

“To test a calculator it’s very important that we test both its functional aspects as well as non-functional requirements.  First I would be testing its functional aspects as follows:

a) Perform valid simple arithmetic operations on numbers and compare results with actual results

b) BODMAS: use a long string of different operations on numbers and see if it follows the BODMAS principle and calculates result accurately

c) Try dividing a number by zero and see the output

d) Calculate square root for a negative number and see the result.

e) Perform mathematical operations on very large numbers and see how it handles them.

f) Press and test the back button it should delete the last digit and update screen.

g) Clear button should reset the screen to zero.

h) Use of appropriate error messages.

i) Other aspects such as weight of the calculator should be as such as that it’s easy to carry; display screen should display the numbers big enough for proper visibility and durability of the product.

I hope it helps!

Advertisements

Comments (2)

Microsoft Interview Experience

Last month I applied to Microsoft through their college recruiting website for SDE/SDET positions and to my amazement the very next day I was contacted by a recruiter who was interested in setting up a telephonic interview with me and had sent me a few initial questionnaires to fill back and return to her. We decided a date and time and I started waiting anxiously for the big day.

Phone Interview

Nicole (recruiter) was sharp on time on the interview day and started off the conversation in a very friendly manner which really helped easing my nerves out. There were no technical questions asked (although I was anticipating a lot of them) and most of the conversation revolved around my resume on questions such as what was your most challenging project? What would you have done different if allowed to go back in time? Do you like to work standalone or do you prefer team projects? Why do you want to work for Microsoft? And finally before we hung up the phone she said “Ok if I want you to test a calculator with simple mathematical functions and made for small children. How would you test it? “. I then asked here a large number of different questions on Microsoft’s work culture, salary and benefits and career paths before we ended the interview. I was pretty satisfied with my performance and was expecting a call up for further rounds.

After two weeks I was again contacted by another recruiter who wanted to set me up for a face to face interview in Dubai on 3rd March 2011.  I was asked to provide all my travelling details which I did so and Microsoft arranged a fully paid trip to Dubai for me.

My interview was in the evening session and to avoid any last moment delays I reached Microsoft Office 30 minutes before the scheduled time. I had to go over 4 technical interviews with Directors of Microsoft Business solutions, Windows Azure, Silverlight and Visual Studio groups respectively.

Interview-1

My first interview was with Director of Business Solutions group (Mr. Azfar). We started off with general discussion about my resume before I was handed a marker and was asked to solve problems on the white board.  The questions that I was asked here were as follows:

  • Write a function that takes a pointer to the head of a linked list and an index and deletes that node. Node consists of a void pointer data and link to the next node. Write test cases for this function.
  •  What’s the difference between master data and reference data?
  • Suppose you have to design the sales modules of an ERP system how you would structure the model for better reporting?
  • Suppose you are given a bit stream and you don’t know from where the bit stream starts. Write a function that returns true if the bit stream has an alternating pattern. For example 000000101010 would return true and 0000001010000 would return false.  Also I had to write test cases for the function.

I was very confident throughout and hardly faced any issue in nailing out the problems on the whiteboard.  I was walking through my algorithms keeping the interviewer in loop and also managed to come up with solid designs and test cases. The interview ended lasted for about 50 minutes after which I was given a 2 minute period to ask any questions if I had. Overall the first interview was a very satisfactory one and it geared me up for upcoming interviews.

We had a 15 minute break during which the recruiter on site Erick, a nice friendly chap made us fill some forms and asked me about my interests and possible teams I would like to work on.

Interview-2

My second interview was with Jason who is head of Testing in Microsoft Visual Studio team (if I am recalling correctly) he was one of the most nice fellows I have ever came across in my professional career he was very friendly and supporting throughout the interview.  Once again I was asked to code on the whiteboard. The coding problems were as follows:

  1. Write a function that takes two strings and returns true if one string is the substring of other.
  2. Suppose you have a  2D array whose elements are increasing both row wise and column wise and you have to find an element if it is present in the array or not. I had to come up with an efficient algorithm for doing this.
  3. Write test cases for both the above functions.
  4. Design a stack using two queues.

I got confused a bit during the interview and hence took longer than normal to solve these simple problems. However Jason was very comforting and supporting throughout.

Interview 3

Third interview was with Director of Windows Azure Development group. This interview focused totally on problem solving and writing test cases for the problems. The problems I was asked during the interview were

  1. Suppose you have a dictionary of words design an algorithm that would scan all words and determine all words that are anagrams. Your algorithm should be efficient and NOT O (n square).
  2. Write a function that would return the first non repeating character in a string. So “Total” would return 0.
  3. Write a function to print the mth from last element of a linked list. (m=0 is the last element). This had to be done using one loop only.
  4. Reverse a string in place ! (in place was the only catch here)

Once again I managed to come up with solutions of all the problems. There was a slight bug in my solution to problem 2 which the interviewer pointed out and I fixed it. Other than that the interviewer was pretty satisfied on how I approached the problems and covered all cases. I was pretty satisfied with this interview and was anxiously waiting for the next one.

 

Interview 4

This was my final interview for the day. I don’t exactly remember the name and designation of the recruiter but he was one friendly chap. Very energetic! And as soon as we entered the conference room he laid the rules straight away! “Write a fully working code! And write efficient code and nothing less!”  All I managed to do was to smile and reply back “ I will try my best”. This interview lasted for 50 minutes and I had just one problem to solve. The problem was as follows:

  1. Suppose you have Binary tree you want to store the binary tree somewhere on the disk or on the cloud once stored than write a routine that would retrieve and rebuild the tree. Cover all cases and come up with at least 10 solid cases.

After a few minutes of brainstorming I came up with an algorithm which I guess really took the interviewer with surprise and he was really impressed with the approach. We managed to walk through the algorithm and write proper code on the white board. The test case session was a very interactive one and I managed to come up with some strong test cases. Overall the interview ended up on a very satisfactory note and I walked out confident and hoping for success!

Post Interviews:

Microsoft gave all the candidates souvenirs and we left for our hotels. I had the flight same night so had little time to roam around Dubai.

Now after 3 days of my interview I was contacted back by Microsoft that they would like to make me an offer in their Dynamics team! It’s an amazing feeling and I have no words to explain this. I am looking forward to a life time experience at Microsoft in coming months!

If you have any questions related to my experience you can contact me by responding to the post.

Comments (28)