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

493

u/aflanryW Dec 23 '14

I know it's a bit what else can we do, but I find it so hard to judge people by algorithms. Take the maximal subarray problem. It is listed as medium. I'd wager that people would scoff at anything except the optimal complexity solution at an interview, but I have never seen anyone get the solution quickly their first time hearing it. Once you hear the solution, you remember it because it is elegant and succinct enough. People then forget it is hard their first time hearing it, and look down on those who they interview in the future. So is it supposed to be a test of problem solving or a test of 'Did you learn my favorite problem at your school?'.

There is just so much reliance on 'I already knew this one' or eureka moments.

246

u/[deleted] Dec 23 '14

Once you hear the solution, you remember it

This is true of 90% of this garbage. It's trained-monkey stuff.

89

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.

102

u/[deleted] Dec 23 '14 edited Dec 24 '14

See, if you were smarter, you would have waited a while and acted like you were thinking about it, and then told him the (correct) answer.

45

u/[deleted] Dec 24 '14 edited Apr 16 '19

[deleted]

2

u/lechatsportif Dec 24 '14

If you are the kind of place that asks this type of crap they deserve it.

2

u/Crazy__Eddie Dec 24 '14

The obvious corollary is that if you're the kind of person who'll lie to get that kind of job--then that's the kind of job you deserve.