2 ms·
> I find it fairly rare for developers that I work with that think of Big O considerations when writing their code. Every time I choose between a set and a vec
by deathanatos 8y ago
> I find it fairly rare for developers that I work with that think of Big O considerations when writing their code.
Every time I choose between a set and a vector in code, I'm essentially drawing on my knowledge of their big-O properties to choose the right one for whatever task I have at hand.
I wouldn't say that's the only piece of CS theory I use, either. I routinely run across problems that are best modeled as DAGs (any dependency relationship between items boils down to this quickly). I use DB theory any time I design a database table. I draw on language theory to write parsers.
Most of it is reflexive, I think, at this point, but it doesn't change that a "vector" is the right structure b/c I don't need O(1) lookup, or I'd like indexing.