Still, leetcode might teach you to write code that passes time and memory constraints, but it certainly won't teach you how to write clean code that passes a code review.
I'd rather learn interview algorithms from books. And by getting feedback from trusted peers.