But if we look from the perspective of the company – maybe it's just an filter to get someone very dedicated and nerdy about programming. Less churn, less questions.
But if we look from the perspective of the company – maybe it's just an filter to get someone very dedicated and nerdy about programming. Less churn, less questions.
Leet code is useless in the real world, everybody knows it. But one would find that people that are able to sit down and learn something useless and stupid only because their boss asked it makes for better employees.
The modern corporate world does not like free thinkers, if not within easily controllable parameters.
The solution for the ones that have better to do that to memorize dumb quizzes for weeks, only to get paid to write basic React components all day, is to go work for yourself, become a consultant, or move to another career.
So I think leetcode interviews get both those groups - the ones you mentioned, who work hard and study (and thus demonstrate good qualities of being employees), _or_ those who are so good at this stuff that leetcode won't even make them sweat.
After, with calm, talking about it with a friend who is a professor at university and has a phd in mathematics, he reflected that since my problem only used positive numbers, I could have exploited a certain property and simplify my algorithm.
So in the end, if you're lucky and have faced that particular completely artificial problem before, you can do it.
Otherwise you need some calm to think, and you can't do that while there are two people harassing you because you named your variables with a name they don't like, and a clock is ticking.
In the end you're selecting for "has this person heard of this problem or a similar one before" and not "can this person think".
Maybe google, amazon and whatnot see that differently but I would not personally wanna work there anyway.
There were students from Greece and Iran who, after a bachelor degree in computer science, could not find the highest value in an array.
Dedicated is a nice way of putting it.
The school system was funded by industrialists who needed well behaved and obedient workers. Academic and Leetcode problems which exist in a vacuum select for those who follows the rules. Tech companies don't actualy want people with a mind of their own.
It's not a perfect proxy for how well they'd solve real user facing problems, but so far it has given me a decent indicator of their motivation/passion and apetite for problem solving. There's a dozen other, mostly non-coding questions in the interview, but this one has been the best predicator for me.
(The problem is closer to a more elaborate fizzbuzz with some math parts, than it is to a memorizable b-tree or other leet-code algorithm question)