DEV Community

loading...

Discussion on: 4 tricks to boost up your algorithms game

Collapse
caroso1222 profile image
Carlos Roso Author

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