Can you elaborate on the distinction between coding competency and leetcoding? I agree with you that leetcode is terrible but I don’t quite follow how your suggestion is very different in practice.
- Do they know common APIs offhand? (Not have to look up)
- Do they write code in a readable fashion?
- Do they consider tests?
- Do they think more deeply about code structure? Immutability, single source of truth, DRY, not overengineering
You can understand all of this by asking a very easy problem that is written in 50-100 LOC. I tend to ask them to implement a certain data structure, where the naive solution is obvious, but still requires ~50 LOC. Then there’s a better runtime solution so I can assess theory as well, but I dont judge primarily on that, or care too much if they figure it out.
You may be surprised how much signal you can get out of asking somebody to implement a class with a few APIs and basic loops/data structures.
The simple fact that people who don’t train specifically for leetcode, don’t do well at it is effectively proof that it’s weakly correlated with real world work results. Otherwise people who are effective in the real world would automatically do well with leetcode. Speaking more to the harder problems though, the easier problems are much more correlated