"数据结构英文教学课件:哈希搜索及碰撞解决策略_03.pdf"
版权申诉
142 浏览量
更新于2024-03-26
收藏 152KB PDF 举报
Data structure is a fundamental concept in computer science that involves organizing and managing data effectively. Searching is one of the key operations in data structures, and in this tutorial, we will focus on hashing as a searching technique.
Hashing is the process of finding a record using a computation that maps its key value to a position in an array. This technique uses a hash function to determine the index where the record is stored in the array. Hash functions play a crucial role in hashing as they convert a key value into a unique index within the array.
There are two main types of hashing: open hashing and closed hashing. In open hashing, also known as separate chaining, collisions are resolved by storing multiple records in the same index of the array. This approach is suitable when there are many collisions, as it allows for efficient storage and retrieval of records.
On the other hand, closed hashing, also known as open addressing, resolves collisions by storing the record in a different location within the array. This approach requires probing techniques to search for an empty slot in the array to store the record. Closed hashing is more challenging than open hashing but can be more efficient in terms of memory usage.
Overall, hashing is a powerful searching technique that is commonly used in data structures to quickly retrieve records based on their key values. By understanding how hashing works and the different collision resolution policies, computer scientists can improve the efficiency and performance of data retrieval operations.
2022-06-16 上传
2022-06-12 上传
2021-07-05 上传
2021-02-13 上传
2022-06-20 上传
2020-05-19 上传
2021-09-17 上传
wxg520cxl
- 粉丝: 25
- 资源: 3万+
最新资源
- 深入浅出:自定义 Grunt 任务的实践指南
- 网络物理突变工具的多点路径规划实现与分析
- multifeed: 实现多作者间的超核心共享与同步技术
- C++商品交易系统实习项目详细要求
- macOS系统Python模块whl包安装教程
- 掌握fullstackJS:构建React框架与快速开发应用
- React-Purify: 实现React组件纯净方法的工具介绍
- deck.js:构建现代HTML演示的JavaScript库
- nunn:现代C++17实现的机器学习库开源项目
- Python安装包 Acquisition-4.12-cp35-cp35m-win_amd64.whl.zip 使用说明
- Amaranthus-tuberculatus基因组分析脚本集
- Ubuntu 12.04下Realtek RTL8821AE驱动的向后移植指南
- 掌握Jest环境下的最新jsdom功能
- CAGI Toolkit:开源Asterisk PBX的AGI应用开发
- MyDropDemo: 体验QGraphicsView的拖放功能
- 远程FPGA平台上的Quartus II17.1 LCD色块闪烁现象解析