Grinding leetcode was never optimizing for solving problems algorithmically but for performing well in live coding interviews.
So knowing solution design, time/space complexity, what tools and patterns exist for certain sets of problems is valued more than being able to correctly type them out in an unfamiliar UI often with limited functionality, while someone watches your face and screen and ideally you have to articulate your thought process clearly within 20 minutes or so.
I develop in TypeScript, so I use the library Effect plenty of it follows functional programming principles, it also has dependency inyection with the objects Context and Layer which can be used for hexagonal architecture and for test driven development I use vitest
Same issues though - normally comes down to knowing a trick rather for leetcode than actual coding
It's been a while since I last interviewed.