Ask HN: List of CS interview questions

18 points by anonytrary ↗ HN
I'm looking for a large compilation of CS programming interview questions and answers. Answers are preferred, but not required. Explicit questions are preferred, but resources such as this Reddit thread[0] are also welcome.

[0] https://www.reddit.com/r/cscareerquestions/comments/20ahfq/heres_a_pretty_big_list_of_programming_interview/

7 comments

[ 4.7 ms ] story [ 28.9 ms ] thread
Leetcode is the right answer. The better question is how folks got to the point of nailing these questions without going to a top CS program or doing competitive programming.

I'm honestly beginning to think it's an inherent ability given how little folks from top schools struggle with interviews.

its not an inherent ability. people from top schools (1) study more questions and memorize common problem-solving patterns & (2) have more network resources with which to practice (e.g. someone from MIT will get 1.5x the number of interview chances that someone from a lesser known uni)
Yeah it makes me wonder too. Especially when good companies are stocked with top degrees. Can they all just be crushing the interview? Is the degree that predictive?
It’s just practice. I went to a good school, but I’ve spent 100s of hours doing programming contest questions. The secret is, there aren’t that many unique interview questions, and so once you get the pattern recognition down (binary search problems, hash table problems, dynamic programming problems, etc.) and practice your speed, interviews become easy.