What's the big O of a lookup in the hash table? If I were to use an array and 
just iterate sequentially through the array looking for an item it would be 
O(n) in the worst case scenario (if what I'm looking for happens to be in the 
last position in the array). What's the worst case scenario for the hash table?




--- In [email protected], Gordon Smith <gosm...@...> wrote:
>
> No, they aren't sorted. They use a storage technique called a hash table.
> 
> Gordon Smith
> Adobe Flex SDK Team
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of d9_tech
> Sent: Thursday, October 15, 2009 2:50 PM
> To: [email protected]
> Subject: [flexcoders] Performance of associative array or dictionary lookup
> 
> 
> 
> I'm curious to know what the algorithm is behind an associative array or 
> dictionary look up. I'm assuming that associative arrays and dictionaries are 
> sorted when they are created and then something like a binary search is used 
> to do the look up. Can anyone confirm that this is true or offer additional 
> information?
> 
> Thanks,
> 
> christian
>


Reply via email to