字符串散列 [英] String Hashing

查看:129
本文介绍了字符串散列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我一直在尝试使用散列实现字典(英语-英语),该字典当然会存储单词.我目前在插入时面临的问题是哈希键冲突.我可以为每个新单词生成随机哈希键,但是在检索时将无法检索特定单词.因此,如果你们可以建议我使用该公式为每个新单词生成UNIQUE哈希键.

此致:)

Hey guys!
I have been trying to implement the dictionary(english-english) using hashing which will of course be having words stored. the problem I am currently facing in the insertion is the hash key collisions. I can generate the random hash key to every new word but when retrieving it will be impossible to retrieve a particular word. So if you guys could suggest me the formula to generate the UNIQUE hash key to every new word.

Regards :)

推荐答案

那是无法完成的.请参见此处 [
That can''t be done. See here[^].

:)


我不知道散列可以完全减少冲突..但是至少必须有最少的冲突..那才是..:)


这篇关于字符串散列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆