Microsoft Interview Question for Software Engineer in Tests






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

wtf?

- Anonymous January 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

yah wtf

- Nishant January 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

yah wtf

- Nishant January 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I would use switch cases.. Then a default one if the inputs were a different one from the allowed ones..

- TestCoder January 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Wat about Regular Expressions... I think it would be easier than switch cases...

- lvs January 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What about std::map?

//data structure we need
map<char*, string> opts1; //the opts which take arguments
map<char*, int> opts2; //the opts which doesn't need arguments, e.g, -R

//algorithm
step 1: first insert all the legal opts into two maps
step 2: parse the input, if illegal or duplicate opts found, return false
step 3: set the corresponding value

- Bingsuns January 30, 2010 | 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