module
0.0.0-20240704100627-bde9685cb471
Repository: https://github.com/jing21/data-structure.git
Documentation: pkg.go.dev
# README
Data-Structure
本项目记录了个人在数据结构知识学习中的知识点,使用go语言实现
数据结构的特性
以下为一些主要的数据结构的特性以及他们的优缺点
数据结构 | 优点 | 缺点 |
---|---|---|
数组 | 插入快,知道下标的情况下,可以快速存取 | 查找慢,删除慢,大小固定 |
有序数组 | 比无序的数组查找快 | 查找慢,删除慢,比无序的数组查找快 |
栈 | 提供后进先出的存取方式 | 存取其他项很慢 |
队列 | 提供先进先出的存取方式 | 存取其他项很慢 |
链表 | 插入快,删除快 | 查找慢 |
二叉树 | 查找,插入,删除都快(平衡的情况下) | 删除算法复杂 |
红黑树 | 查找,插入,删除都快,树总是平衡的 | 算法复杂 |
2-3-4树 | 查找,插入,删除都快,树总是平衡的,类似的树对磁盘存储有用 | 算法复杂 |
哈希表 | 如果key关键词已知,存取极快,插入快 | 删除慢,如果不知道关键词则存取很慢,对存储空间使用不充分, |
堆 | 插入,删除快,对最大数据项的存取很快 | 对其他数据存取慢 |
图 | 对现实世界建模 | 有些算法慢且复杂 |
以上所有的数据结构,除了数组以外,都可以被称作是抽象数据结构(ADT)。
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author