3.24. 总结¶
3.24. Summary
-
线性数据结构以有序的方式维护其数据。
-
栈是简单的数据结构,维持 LIFO(后进先出)顺序。
-
栈的基本操作是
push
、pop
和is_empty
。 -
队列是简单的数据结构,维持 FIFO(先进先出)顺序。
-
队列的基本操作是
enqueue
、dequeue
和is_empty
。 -
前缀、 infix(中缀)和后缀是表达式的三种写法。
-
栈在设计算法以评估和转换表达式时非常有用。
-
栈可以提供反转特性。
-
队列可以帮助构建时间模拟。
-
模拟使用随机数生成器创建现实情况,并允许我们回答“如果”类型的问题。
-
双端队列(Deque)是允许混合行为(如栈和队列)的数据结构。
-
双端队列的基本操作是
add_front
、add_rear
、remove_front
、remove_rear
和is_empty
。 -
列表是项的集合,每个项都有一个相对位置。
-
链表实现维护逻辑顺序,而无需物理存储要求。
-
链表头部的修改是一个特殊情况。
-
Linear data structures maintain their data in an ordered fashion.
-
Stacks are simple data structures that maintain a LIFO (last in, first out) ordering.
-
The fundamental operations for a stack are
push
,pop
, andis_empty
. -
Queues are simple data structures that maintain a FIFO (first in, first out) ordering.
-
The fundamental operations for a queue are
enqueue
,dequeue
, andis_empty
. -
Prefix, infix, and postfix are all ways to write expressions.
-
Stacks are very useful for designing algorithms to evaluate and translate expressions.
-
Stacks can provide a reversal characteristic.
-
Queues can assist in the construction of timing simulations.
-
Simulations use random number generators to create a real-life situation and allow us to answer “what if” types of questions.
-
Deques are data structures that allow hybrid behavior like that of stacks and queues.
-
The fundamental operations for a deque are
add_front
,add_rear
,remove_front
,remove_rear
, andis_empty
. -
Lists are collections of items where each item holds a relative position.
-
A linked list implementation maintains logical order without requiring physical storage requirements.
-
Modification to the head of the linked list is a special case.
创建日期: 2024年9月9日