Microsoft Interview Question for Software Engineer / Developers


Country: India
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
1
of 1 vote

Test Cases:

1. Inserting empty inputs
2. Inputs of very large size
3. A number with non-numeric characters in between
4. A number with non-numeric characters in between, which is an Anagram
5. A completely non-numeric input with numbers at the ends
6. A completely non-numeric input which is an Anagram
7. Inputting a Program Code as input to check if something amiss does not happen
8. Performing the above tests in different environments

- Gopi December 31, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You forget to mention that both inputs should be of same length

- saurabh February 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

What do you mean by tests in different environments?

- kenny August 29, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I'd definitely as what they mean by "two numbers"? Are they ints?
Can they be decimals? Floats/doubles? Signed/unsigned?
Or strings? (like the first comment suggested)

- Selmeczy, Péter December 31, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

you have to develop the test cases..consider any type of input you want...which you would like any anagram program to satisfy.

- Anonymous December 31, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

OK, let me re-word a bit: You have to test for "is a number" and "is an anagram"
These two are independent and I don't think it is a good idea to come up with mixed test cases (like anagram but not number)
Plus you need to consider the special cases like empty, very long, etc.

You test for the BOTH conditions and then/or before for the special cases.
At least this sounds logical for me - I am not a tester just a developer...

But testing for "is a number" requires a lot more clarification of what a number is e.g. for an engineer a complex number _is_ a number ;) so 3+4i and 4+3i are nice anagrams and .31415E+1 and +1.3514E1.

- Selmeczy, Péter January 01, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More