What is a hash map in programming and where can it be used

前端 未结 4 1970
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 04:24

I have often heard people talking about hashing and hash maps and hash tables. I wanted to know what they are and where you can best use them for.

4条回答
  •  难免孤独
    2020-12-13 04:54

    Basically, a HashMap allows you to store items with identifiers. They are stored in a table format with the identifier being hashed using a hashing algorithm.

    Typically they are more efficient to retrieve items than search trees etc.

    You may find this helpful: http://www.relisoft.com/book/lang/pointer/8hash.html

    Hope it helps,

    Chris

提交回复
热议问题