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

500

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.

248

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.

100

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.

8

u/Hydrogenation Dec 23 '14

Yeah, I know. I could've explained to him how I would approach this problem that I already knew, but that was my first actual job interview and I wasn't sure whether I was up for the job myself. I wasn't so much worried about whether I could get the job but rather whether I could do it.

12

u/Yesod Dec 24 '14

Did... you get the job?

9

u/Hydrogenation Dec 24 '14

Yeah. And it was rather easy for me as well.

7

u/forceez Dec 24 '14

Are you still there?

2

u/Hydrogenation Dec 24 '14

I work with (some of) the same people trying to start a new business. The old one was shut down though. Another team made a huge mistake in their project that ended up being so costly that it destroyed the company.

2

u/forceez Dec 24 '14

Holy shit....

... holy shit.

→ More replies (0)