I know the take home assignment is a divisive subject, but I think it's the perfect way to evaluate a person's coding ability. Did they use dependency injection or did they reference globals straight in the code? Did they break down the code into small testable chunks or write one giant file? Would their code pass code review? These things are way more important for most codebases than shaving an order of magnitude of big 0 complexity.
The only issue with the take homes is that they take a ton of time. Most companies say that it should only take a few hours but also ask for production grade code. Thats impossible - clean code takes time. Companies should at least start compensating for the time taken to do the assignment.
My favorite interview process involved a take home assignment which if you pass takes you directly to the final onsite interview. There the live coding sessions involved building more features onto the take home. As an experienced programmer who sucks at Leetcode I really hope the industry moves in this direction.