Categorygithub.com/jing21/data-structure
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