I am seeing so many companies ask LeetCode questions for software engineering jobs. (even for just developing website's front end).
Those questions can be very specific and not something that a typical software engineer would do even in 15 or 20 years. For example, it could be, given 10000 x 10000 slots and dividers of varying height between them, now find out a 20 x 20 region that can trap the most rain water when it rains for a long time.
And there can be 1500 different questions in the LeetCode database.
And the catch is, many programmers can write some code that can find the answer, but the problem usually has some tricks in its problem's property that, somehow you may be able to do it faster.
And researches were done for these types of problems, sometimes for months or for years, as a master or Ph.D. thesis.
But the thing is, programmers, especially programmers who develop the front end of a website, don't do it at all. Not even once in 20 years. So it is not really their real job content.
But the companies like to ask you these questions, and people who read the answers on LeetCode, they may get 5 out of 5 points for the several interview sessions and get into the company, while the person who wrote a correct solution but not the solution that took people months or years to find out before, get a 3 or 3.5 out of 5 only, and they are rejected as a candidate.
And what I found sometimes is: these engineers enter the company, and sometimes they cannot even write correct code. They know standard answers to those questions, but when seeing a real problem, they did not know how to think sometimes -- not as well as the candidates who can actually think well in the interviews.
But companies hire people using this method any way. I do not quite understand how and why it works this way?