That’s not a fair characterization of how most companies (well, at least FAANG) do algorithmic interviews.
A good algorithmic interview does not test algorithm trivia. The question should be solvable with only strong structured thinking and fundamentals.
For example, the much-derided “reverse a binary tree” question (I don’t ask it but I think it’s reasonable) doesn’t really require a ton of algorithm trivia. The data structure can be explained in a few minutes and the problem definition can be made super clear and crisp.
Re:In defense of coding interviews
by Apocryphon on Sunday May 29, 2022 @01:51PM
(#31551134)
Algorithmic interviews, at least the way they are formatted now (with interviewers silently watching over the candidate at all times, typing notes) also test for anxiety:
https://news.ycombinator.com/item?id=23848039
Maybe the content, despite it being able to be gamed and drilled via Leetcode et al, is sound, but the format in which it is tested may not be.
I've interviewed for Facebook and Google in the past, and at both, my algorithm questions were textbook leetcode/competitive programming questions. You either know the algorithm and/or data structure and know the answer,or you don't and you fail the interview.
Knowing how to implement prefix tree or a hash table shows that you've learned solutions, but not that you can write good code in a team environment. Frankly I'd take a worse engineer that worked better in a team over a 10x that ends up silo'ed in 95% of cases.