第二章(续1) 特殊线性表:栈、队列、串

type
status
date
slug
summary
tags
category
icon
password

一、栈

1.栈的定义与操作

notion image

2.栈的顺序存储结构及实现

3.栈的链式存储结构及实现

链表首端在栈顶

4.栈与递归调用

5.1栈的应用1——四则运算表达式求值

逆波兰表示/后缀表达式

5.2栈的应用2——迷宫求解问题

notion image
notion image
C
notion image
notion image
notion image
notion image
B 逻辑结构:集合、线形、树形、图形
notion image
A
notion image
D
notion image
C
notion image
notion image
notion image

期末真题

2021

notion image
n - 1

2020

notion image
notion image

2015

notion image
A

二、队列

1.队列的定义

notion image

2.队列的顺序存储

假溢出:循环数组 Q.front = (Q.front + 1) % MaxSize

3.队列的链式存储

4.队列的应用

notion image
B
notion image
B
notion image
notion image
C
notion image
notion image
notion image

期末真题

2016

notion image

2015

notion image
C

三、串

notion image

1.串的定义与操作

2.串的顺序存储结构及实现

3.串的链式存储结构及实现(少用)

4.模式匹配

① 朴素模式匹配算法(Brute-Force算法):
主串指针回溯i-j+1 模式串指针复位j=0
平均时间复杂度O(n*m)
② KMP算法
【最浅显易懂的 KMP 算法讲解】 https://www.bilibili.com/video/BV1AY4y157yL/
notion image
notion image
notion image
notion image
精髓在于i不回溯!!!

期末真题

2016
notion image
A
Loading...