Hacker News new | past | comments | ask | show | jobs | submit login

One thing of note: if you want sorted order, there's no reason to be using a hash table.

It would require either worse than O(n) amortized iteration, or worse than O(1) expected insertion (A log n has to go somewhere to satisfy the theoretical lower bound for sorting).

If you want sorted, you're going to use a tree based structure.

I'm also not sure how you'd even naturally get sorted order into a hash table. I'm sure it's possible, but on the face of it it just seems bizarre.







Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: