1)一个优秀的哈希算法有什么特点?
快速、不可逆、敏感性、低碰撞性
2)自己写一个Hash算法
取模
3)Java中的Hash算法
HashMap,侧重点是速度
Object.hashCode,直接获取内存地址
Integer.hashCode,直接返回intValue
String.hashCode,根据字符串内存生成hashCode,字符串内容一样的hashCode也相同
原文:https://www.cnblogs.com/yeahwell/p/10613909.html