The most friction when switching jobs is the interview process -- and the question is why? I've been writing code for a decade+ now, working on startups, for known tech companies, public open-source, and have written a freakin' book! But, oh, my bad, I couldn't figure out a solution to your optimization question. I forgot how to implement the zig operation in a splay tree. I might simply not function well under pressure. Maybe I'm having a bad day.
Companies are missing out on literal geniuses by using outdated hiring practices. And, I get it, Google doesn't care. Amazon doesn't care. (There's an argument that they should.) They're huge and get X,XXX applicants daily. But why are small startups using the same hiring methodologies? It quite literally makes no sense. They're shooting themselves in the foot. I'm very passionate about this, and I'm working on a book on how to hire engineers. Maybe I'll actually finish it one of these days :)