- 1 基本数据结构
- 2 栈的概念
- 3 栈的抽象数据类型
- 4 栈的实现
- 5 栈的应用之圆括号平衡
- 6 栈的应用之符号平衡(通用)
- 7 栈的应用之进制转换
- 8 栈的应用之中缀前缀后缀
- 9 中缀后前缀、后缀的转换思路
- 10 栈的应用之中缀转后缀表达式算法的实现
- 11 后缀表达式求值
- 12 队列的概念
- 13 队列的抽象数据类型
- 14 队列的 python 实现
- 15 队列应用之烫手的山芋
- 16 队列应用之 打印任务
- 17 列表
- 18 无序列表的实现
- 19 有序列表 ADT 及实现
- 20 递归和递归三定律
- 21 递归的实现和应用
- 22 递归图形
- 23 宾斯基三角形
- 24 汉诺塔问题(河内塔问题)
- 25 探索迷宫
- 26 动态规划
- 27 排序与查找 顺序查找
- 28 二分查找
- 30 冒泡排序
- 31 选择排序
- 29-1 哈希查找
- 29-2 冲突解决
- 29-3 用哈希表实现映射
- 32 插入排序
- 33 希尔排序
- 34 归并排序
- 35 快速排序
- 36 树的基本概念
- 37 树的实现
- 38 分析树
- 39 树的遍历
1 基本数据结构
Basic Data Structures 第 1 章 基本数据结构
Objectives
学习目标
- To understand the abstract data types stack, queue, deque, andlist.
- To be able to implement the ADTs stack, queue, and deque usingPython lists.
- To understand the performance of the implementations of basiclinear data structures.
- To understand prefix, infix, and postfix expression formats.
- To use stacks to evaluate postfix expressions.
- To use stacks to convert expressions from infix to postfix.
- To use queues for basic timing simulations.
- To be able to recognize problem properties where stacks, queues,and deques are appropriate data structures.
- To be able to implement the abstract data type list as a linkedlist using the node and reference pattern.
- To be able to compare the performance of our linked listimplementation with Python’s list implementation.
- 理解栈、队列、双向队列和列表的抽象数据类型
- 以 python 之 list 为工具,建立栈队列双向队列和列表的 ADT
- 理解基本数据结构的性能
- 理解前置、中置和后置表达式
- 使用栈计算后置表达式
- 用栈把前置转后置
- 用队列实现基本的时间仿真
- 学会根据问题性质,选择使用栈队双向队等合适的数据结构
- 用列表的 ADT 实现链表的节点和指针
- 学会比较链表和 list 的性能
What Are Linear Structures?
什么是线性数据结构?
We willbegin our study of data structures by considering four simple butvery powerful concepts. Stacks, queues, deques, and lists areexamples of data collections whose items are ordered depending onhow they are added or removed. Once an item is added, it stays inthat position relative to the other elements that came before andcame after it. Collections such as these are often referred toas lineardata structures.
我们开始数据结构的学习,从四种简单而功能强大的结构开始。栈、队、双向队和列表是一种数据的集合,它的元素根据自己被加入或删除的的顺序排列。当一个元素加入集合之后,它就与之前和之后加入的元素保持一个固定的相对位置。这种数据集合叫做线性数据结构。
Linearstructures can be thought of as having two ends. Sometimes theseends are referred to as the “left” and the “right” or in some casesthe “front” and the “rear.” You could also call them the “top” andthe “bottom.” The names given to the ends are not significant. Whatdistinguishes one linear structure from another is the way in whichitems are added and removed, in particular the location where theseadditions and removals occur. For example, a structure might allownew items to be added at only one end. Some structures might allowitems to be removed from either end.
既然是线性,就有两头。有时叫做“左侧”或“右侧”,有时叫做“前端”“后端”,叫做"顶部“和”底部“也无不可。因为名字不重要。重要的是数据结构增加删除数据的方式,特别是增删的位置。例如,一种结构可能只允许从一头增加成员,另一种结构则两头都行。
These variationsgive rise to some of the most useful data structures in computerscience. They appear in many algorithms and can be used to solve avariety of important problems.
这种方式的变化在计算机科学中构成了多种非常有用的数据结构,他们出现在各种算法和重要问题的解决方案中。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论