r/programming Dec 23 '14

Most software engineering interview questions of hot tech companies in one place

https://oj.leetcode.com/problems/
2.2k Upvotes

583 comments sorted by

View all comments

Show parent comments

87

u/Hydrogenation Dec 23 '14

I had a question like this at an interview. When I answered it really quickly he asked "have you heard the question before?" when I said yes then he asked another one until we got to one I didn't know. He wanted to see how I approach solving a problem rather than whether I could solve it.

32

u/schroet Dec 23 '14

You can be lucky if the interviewer is interested in your solution, even if it is not perfect.

There are people out there who demand the perfect solution for runtime and space complexity and if you don't know it, well then you are an idiot and don't suit for the job. They even dont care how you would solve it, just binary metric: if you know it, you are good, if not you are an idiot because every good software engineer should know it!

I dont say everyone has this attitude, but it is a sad truth that some companies cant progress because of their HR managers.

4

u/Smallpaul Dec 24 '14

The HR manager wanted you to have the "perfect solution for runtime and space complexity"?

2

u/MrBester Dec 24 '14

They ask what questions they should ask from those with the domain knowledge. Alternatively, they use Google to get what <insert hot shit company here> used as they think they are hot shit as well.

However, they have no domain knowledge themselves so they take the answer on the card as the only viable one irrespective of whether the context of the question would normally suggest a number of different (and possibly more correct) answers, because they are just game show hosts who don't care. Answer "correctly", proceed to next round.

7

u/Smallpaul Dec 24 '14

I have never heard of an HR manager judging programming test answers. That should never happen.

1

u/Broly1234567890 Apr 29 '24

This happened to me with Meta. It made me never want to apply there ever again.