Microsoft Interview Question for Software Engineer in Tests






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

For this question, I got baffled because the answer is like so straight forward create a hash... I assumed he don't want that solution and after saying hash as my first thought gave him several approaches but then he wanted me to code in IDE (we were remoting) then I thought sticking to hash solution because its simple. He even allowed me to use library functions like str.Split(I assumed for a while that I shouldn't). I got the solution working. I didn't handle special characters and spaces due to lack of time but I think its not bad for a phone interview.

- prolific.coder July 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I'm curious if you passed the phone screen? Coding remotely like that while on the phone is rough

- Anonymous July 14, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

And my phone got cut like 4 times in between... it was pretty rough. At the end I was rejected.. reason I didn't consider all the key cases. Even though I am insisting that the code is not complete by the time interview was closed and offered test cases that break my code.

- prolificcoder July 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Not a great question choice for a phone screen.

Really in a phone screen you want to quickly access the candidate's ability to problem solve and gauge their technical depth. So a phone screen might ask the candidate to explain some technical detail on their resume in depth, or explain their project experience. Then the problem solving part of the screen should involve giving the candidate a basic coding problem (string manipulation thing or ATOI or something) and have them work it out and verbally tell you an approach/solution.

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

Technical Interviewers nowaday are all full of SH IT. It think it's only fair that they should in return let the candidate asked them back technical coding questions and determine if the interviewer is fit to be interviewing them and whether they are good to work with as a teammate too. (just like how you ask the interviewer questions about the company and projects at the end of the interview). That way, the interviewer will be less arrogant and strict knowing that they will be asked technical questions too.. what comes around goes around. So if they ARE very technical competent, they will not be afraid of asking deep questions to you since they know they will answer them if you ask something back.

F THE IT INDUSTRY..NO WONDER GAYLE IS GOING FOR AN MBA. It's a lot easier interviewing for business positions than it is for technical crap.

- Anonymous July 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Yeah as a former MSFT developer I've seen some egos on interview loops. I tent to agree with you.

- Anonymous July 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

As an aspirant for MSFT.. I failed atleast 2 tech screens due to arrogant interviewers. You have to find give them the answer(doesn't matter if you just remembering) no help nor guidance offered, its not a discussion its a test!

- Anonymous July 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Don't feel bad, I worked there and was subjected to the same thing while trying to switch teams. I had above average performance reviews, lots of code I'd written for anyone to review. None of it mattered - I was treated like a pile of garbage in the loops. One loop I ended up getting an offer but declined because the interviewers were straight up jerks. The other loop I got a NO HIRE for effing up one poorly structured coding question. I ended up leaving for a competitor.

The arrogance is unbelievable at that company.

- Anonymous July 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

speaking of arrogance I think all the companies (sucessful) have it anyway google just look the questions they ask, amazon look at the offer to reject ratio, apple well i never even got a call. Well I wonder, what kind of people are getting hired these days.. I mean I can write pretty good code and think have a very good attitude but the number of rejects is simply unbearable. Well, I just have to keep trying and hope the timing comes out right one day.

- Anonymous July 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Right, the interviewers expect you to write perfect code in all the loops (in a full loop). Failing one would mean failing the entire interview. Why don't they understand that nobody writes code like that on a daily basis. Also, one interviewer would ask you to code in C++ and the next would want in C#. Crazy people!!!

- Anonymous September 23, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Well, I've had a case where I answered all the questions and still shown the door in 3 rounds :) and when I didn't do properly and still met the as app interviewer. But I still didn't get offer, so no matter the only thing for sure is getting rejected

- Anonymous September 23, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

tent, tend.. no edit function in the posts :D

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

Hey,
I guess use of a trie will make things very simpler because I think a perfect random hash function will be very difficult to find; even if you use chaining there will be more memory wastage, things will be slower because (considering the book to be large)
everything has to be brought from disk, technically there will be more page faults.
If you use open addressing, usually the size of the hash table is twice that of the required number of words.

If trie is used, then the branching factor is 52(26 for small and 26 for Capital)..as in you can improve upon it if u argue that usually first letter is capital and the rest is small..(not including words in capital letters , usually abbreviations).

- sarthak July 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@prolific.coder: do you think a solution using STL (map/hashmap) is acceptable here? I think if you are allowed to use built-in split function, then it is like 10 lines of code in C++, which is pretty doable in 20-30 minutes.

my opinion about hashing is that it's not so easy to code 100% accurately in a short time, 'coz you've to deal with hash function also lot of pointer operations. If the interviewer doesn't restrict using STL, then why don't we use STL instead?

@Sarthak: How much time you need to implement a trie that you said it's "simpler"! Can you write down full code in 25-30 mins? I doubt!

Trie is "awesome" data structure, but implementation is much lengthy for limited time.

- anonymous July 19, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@ above anonymous:can u plz explain logic behind this using built in split function

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

Can't you use a BST for this.. complexity would still be at max O(nlogn) ,,,

- aseem September 14, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Cant we use trees of words with each node a array of 26 chars.

- Shilpa October 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Trees of count values you should say.
And that is called "trie".
Maybe u should check "trie" structure

- erm October 28, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

split the string into array of words, sort the array alphabatically and go through it. Whenever word n is equal to word n+1 increase the number of times its repeated.

- Omar October 07, 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