Comment

Comment by 908B64B197

> On the rare occasion that I need to use a data structure or an algorithm to optimize for Time Space complexity, I'll either use a community built package or a language level feature. I'll never invent my own because whatever I come up with will be half baked anyway.

In these cases you recognized you needed to use a specific algorithm or data structure and was aware of it's existence, name and properties. That's most of the work.

Contrast this with code where common data structures are re-implemented (I need a dictionary and all I know is an array, better iterate and compare the keys until I find the right thing). And that's only scratching the surface of bad code, believe me.

parent 908B64B197 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton