Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: What makes an array sorted and a hash unsorted?

by gwadej (Chaplain)
on Jun 02, 2009 at 03:40 UTC ( [id://767451]=note: print w/replies, xml ) Need Help??


in reply to Re^2: What makes an array sorted and a hash unsorted?
in thread What makes an array sorted and a hash unsorted?

You are correct. I was sloppy with the term keys.

It would be more accurate to say that the data is not ordered with respect to the original keys. However, it is ordered with respect to the result of the hash function applied to the keys.

Given that a good hash function should distribute the data fairly evenly through the table (and that the hash function is often not known by the user), this is effectively the same as saying that the data is not ordered with respect to the original keys.

G. Wade
  • Comment on Re^3: What makes an array sorted and a hash unsorted?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://767451]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found