3 ms·
It's important to note here that leetcode questions doesn't mean "LeetCode Hard" where the only solution is an obscure algorithm that is on average never used i
by tomp 3y ago
It's important to note here that leetcode questions doesn't mean "LeetCode Hard" where the only solution is an obscure algorithm that is on average never used in production code (except deep in libraries you didn't write).
Leetcode questions can be fairly basic algorithmic/data structures questions, like "how do you store an ordered collection with O(1) lookup (ordered dict, i.e. hashtable + list)" or "check if this list contains duplicates" (use a set, not a list!), or "calculate the square root of this number" (bisecion, i.e. looping).
These are not production code questions, but the benefit is that they're easy to explain and understand in the limited time you have available for an interview.
Unfortunately there are more than expected number of people who fail these basic questions. You really don't want to hire them.