Microsoft Interview Question
Software Engineer in TestsI'm curious if you passed the phone screen? Coding remotely like that while on the phone is rough
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.
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.
Yeah as a former MSFT developer I've seen some egos on interview loops. I tent to agree with you.
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!
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.
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.
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!!!
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).
@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.
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