I was just watching a video about algorithm performance by the @ThePrimeagen . It reminded that Big-O complexity is not always the final story. When choosing a data structure, it's useful to consider the 'composition hierarchy'. You can implement an algorithm using a Hash…

neetcode1's tweet image. I was just watching a video about algorithm performance by the @ThePrimeagen . It reminded that Big-O complexity is not always the final story.

When choosing a data structure, it's useful to consider the 'composition hierarchy'.

You can implement an algorithm using a Hash…

Here's the video btw: youtube.com/watch?v=U16Rnp… Genuinely one of the best videos I've ever watched


cool but premature optimization is the root of all evil


i agree, that's why arrays are better than hashsets in many cases, for some ppl this is counter intuitive


Man, fake language is paying my bills


"prob because you use a fake language like JS or Python"😂😂😂


The correct term for this consideration is called "cache coherency". This is why linked-list are virtually never faster than the corresponding array of pointers even after memory allocation optimizations.


Also, With small amounts of data the chances of key collision is high And in some implementations, key collisions are handled by using a linked list - which might result into 0(n) lookup in the worst case


What do you mean by fake language 😭?


Woowww 😲


I agree. Moreover, if someone is deciding what approach to use for a specific application solely by big O ordering, they probably don't understand what big O is.


Wow, gonna watch the video now. Each iteration is leading to crazy optimization here.


I wonder if all interpreted languages are fake, or what other properties would make it fake


Composition Hierarchy?💀


This is what cs degree taught people to think and use all the tools available and mix match with problem set .


is neetcode.io broken? all my progress is lost navi and its not opening up the problems...


@ThePrimeagen check this out and quote of decade " fake language like js or python" 😆😆😆😆


United States Trends
Loading...

Something went wrong.


Something went wrong.