Getting ready for some interviews, and working through problems on leetcode, finding that my answers are often consuming more memory or runtime than prior submissions. Is solving the problem usually good enough? Roles I'll be interviewing for are not technically swe, but, do have swe interview components. E.g. Linux appliance dev, MS SRE.
No. Solving optimally is required for top tier companies.
No, time and space complexity don't matter at all! Just grind out 400+ LC and tell your interviewer you did so and you'll guarantee a 400k TC offer
Reasonably fast is good enough - you don't need state of the art 21st century algorithms
Big O Time and space complexity is more important than the leetcode stats!
I wouldn't trust LC stats either. Half the time it says I wrote code that took 0msec and beat 100% of other submissions. My code is fast ... Not that fast :)
Hardcoding solutions is the only way to go.