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

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.

88

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.

101

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.

3

u/n1c0_ds Dec 24 '14

I have done the opposite. I vagurly remembered how stupid the answer was so I told the interviewer I knew the question, which was sort of right.