4 ms·
Even among textbook questions from the infamous leetcode and the likes, there are a few good ones. For instance I was once asked this one: https://leetcode.com/
by hocuspocus 8y ago
Even among textbook questions from the infamous leetcode and the likes, there are a few good ones. For instance I was once asked this one: https://leetcode.com/problems/flatten-nested-list-iterator/ https://leetcode.com/problems/flatten-nested-list-iterator/
- it's not too short or too long
- there's no trick, it's just a matter of being thorough
- it's pretty concrete (modern languages have that in their standard lib) and/or might actually come up someday in your day-to-day job
And in my opinion, what matters even more is that your full round of interviews shouldn't be just 5 slots of algo questions. One or two should be enough. I like combinations of a take-home challenge (keep it short!), pair programming sessions and architecture / systems design discussions.