prepping for a real interview

I've noticed a difference between the "best" solutions on leetcode and what I'd consider appropriate code for work. Typically when I'm at work I'm more focused on writing readable code for other people (abstracted into small functions, non-obscure syntax, reads like english, not too much regex, easy to refactor, etc.). This isn't always the best for speed, which is what leetcode seems to be geared for since the only metric available is runtime.

I was wondering which is the best approach for an interview? My true work coding style is much more verbose, but should I code more like the fastest solutions I see here?

Thanks!

Note: I don't see one as absolutely better than the other or even that they're mutually exclusive. I just want to know how to focus my practicing so I can do well on an interview.

Comments (1)