4 ms·
As a different perspective: I end up writing a fair bit of code that involves data structures and algorithms. Runtime complexity does come up in my line of wor
by moregrist 3y ago
As a different perspective: I end up writing a fair bit of code that involves data structures and algorithms. Runtime complexity does come up in my line of work, and I've definitely had to solve a couple of issues related to code being accidentally quadratic. So I do value basic Big-O analysis, and it's definitely nice to know some core data structures, especially arrays and hash tables.
But what leetcode and leetcode interviews optimize for isn't all that valuable. In the context of the job there are usually different space/time constraints than what you'll see in leetcode, and there are also integration constraints that can change/invalidate textbook approaches.
Most importantly, though, you always have more than 30-60 minutes to figure things out, and can consult whatever references you want.