I think the some keys may have hashed to same hash. Many hash
collisions and hash table expansion may have result in worst get/add
time complexity of O(n) instead of constant O(log n) for RB tree.

- Nat



2010/5/26 Ketan Joshi <[email protected]>:
> Hi guys,
> This could be a wrong forum for such a question, but I am posting it here
> anyways.
> I read somewhere that c++ maps are implemented using height balanced trees
> (red black trees specifically).
>
> Why wasn't it implemented using hash tables? wouldn't it have been faster
> specially since maps dont allow duplicate keys?
>
> ~Ketan
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-codejam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-code?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to