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

前端 未结 4 1951
爱一瞬间的悲伤
爱一瞬间的悲伤 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:56

    Hashmap is used for storing data in key value pairs. We can use a hashmap for storing objects in a application and use it further in the same application for storing, updating, deleting values. Hashmap key and values are stored in a bucket to a specific entry, this entry location is determined using Hashcode function. This hashcode function determines the hash where the value is stored. The detailed explanantion of how hashmap works is described in this video: https://youtu.be/iqYC1odZSNo

提交回复
热议问题