首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

which is the faster to find a value on average,该如何处理

2012-03-20 
which is the faster to find a value on averagewhich is the faster to find a value on average()A arr

which is the faster to find a value on average

 which is the faster to find a value on average()
  A array
  b binary tree;
  c hash table
  d stack 

 请说明原因

[解决办法]
哈希是常数。
数组和二叉树 跟序列是否有序有关。
栈要遍历的。
[解决办法]
cbad
[解决办法]
只要根据开散列hash_table中元素个数不断的扩充hash_table的桶数量以保证几乎没有冲突即可.
[解决办法]
题目的意思是不是:哪种方法的平均查找更快一点?

最快的应该是c!

Hash table 哈希表,是根据关键码值(Key value)而直接进行访问的数据结构。也就是说,它通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度。也就是说,设计哈希表的目的就是加快查找速度的,能不快吗!

热点排行