TL;DR.
Associate O(1) with table lookups and math
O(n) is for list traversal
The weird logarithm is for sorting: O(nlogn)
Connect O(n2) with nest...
For further actions, you may consider blocking this person and/or reporting abuse
Good overview.
But pedantic me would like to point out that math is technically related to the number of bits in the data size. We usually deal with fixed sizes, but things like Python have unlimited integer size, and classes like BigDecimal are common in languages.
Hashmaps/tables, yeah, your linked site shows well the complexity there. So, average time O(1), but really, it's complicated. :)
Good insight, thanks! Yeah, a worst-case scenario for hashmaps would require O(n) for read if all the objects happen to collide under the same hash (thus making the linked list abnormally large). As you point out, O(1) is a good average for newcomers and for interview purposes :D
I'm always happy to share what I learn, glad you liked it!
I'm starting to take this kind of interviews for remote work and find this guide so helpful, thanks!
Nice, good luck with your interviews!
Bless you.
🙏
This is awesome Carlos! Love it 🙌
Appreciate it, I'm glad you liked it!
Nice work man, Creative Algo here i see , it will so helpful and i hope i can use it for conversational AI. Thank you
Im glad you found it helpful!