Programming / Technical Interview Questions

Check out http://www.glassdoor.com/ too - different type of site, but I think extremely useful in learning what it takes to get through a job interview for a particular company and also, from employee reviews, how it feels actually working for it.
 
It has some interesting problems but I don't think I'd rely on it for answers when the questions get difficult.

The "Find the median value in an arbitrarily large file of 64-bit integers" question is almost certainly testing for awareness of linear time median algorithms rather than the obvious method of sorting (arbitrarily large input makes that "log(n)" factor kind of a problem).

The "Write a function to find the least common multiple of integers in an array" question is probably looking for Euclid's algorithm rather than what's come up with there. (Leaving aside the fact that the question asks about an array of integers rather than just two).

The "Design a class to represent a deck of cards, and implement a shuffle method for the deck of cards" question must be basically testing whether you can come up with an algorithm to generate a random permutation which nobody does. (There's one attempt and it's wrong.)
 
I wonder how much time you are given on interview questions...For example I have defined the first two questions linked above and would do those ones in 5 minutes time I think. But for the third one I need to think a bit. I don't really know how they give candidates time they need.
 
The "Design a class to represent a deck of cards, and implement a shuffle method for the deck of cards" question must be basically testing whether you can come up with an algorithm to generate a random permutation which nobody does. (There's one attempt and it's wrong.)
And the next question is (usually) - lets consider we have 1000 rooms will you generate 52K cards and then shuffle every deck or you can come with more memory efficiten solution and how will you shuffle cards in this case.
 
Back
Top Bottom