第 0 章 一些不那么常识的常识 ············································································.1 0.1 本地编程环境的配置··············································································.1 0.1.1 在 Windows 系统上安装使用 Dev C ···············································.1 0.1.2 在 MacOS 系统上安装 Xcode ··························································.4 0.2 在线评测系统—洛谷···········································································.7 0.2.1 注册洛谷 ···················································································.8 0.2.2 提交题目 ···················································································.9 0.2.3 团队管理 ·······································��···········································11 第 1 章 线性数据结构 ························································································15 1.1 数据结构·····························································································15 1.1.1 数据结构的定义 ··········································································15 1.1.2 数据结构的运算 ··········································································17 1.1.3 线性数据结构 ·············································································17 1.2 栈······································································································18 1.2.1 栈的定义 ···················································································18 1.2.2 栈的作用 ···················································································20 1.2.3 栈的固定数组实现 ·······································································21 1.2.4 STL 中的栈 ················································································24 1.2.5 括号匹配问题 ·············································································26 1.2.6 前缀、中缀、后缀表达式 ······························································30 1.2.7 后缀表达式的计算 ·······································································32 1.2.8 中缀表达式转换为后缀表达式 ························································36 1.2.9 中缀表达式的计算 ·······································································41 1.3 队列···································································································43 1.3.1 队列的定义 ················································································44 1.3.2 队列的作用 ················································································46 1.3.3 队列的固定数组实现 ····································································46 1.3.4 STL 中的队列 ·············································································47 1.3.5 基数排序(Radix Sorting)·····························································50 1.3.6 结构体的构造函数 ·······································································56 1.3.7 队列的应用 ················································································59 1.4 前缀和·······························································································.66 1.4.1 前缀和的引入 ············································································.66 1.4.2 一维数组前缀和 ·········································································.66 1.5 动态数组····························································································.75 1.5.1 动态数组 vector ··········································································.75 1.5.2 STL 中的动态数组 ······································································.75 1.5.3 vector 的缺点 ·············································································.76 1.5.4 vector 与迭代器 iterator·································································.76 1.5.5 vector 与 C 11 ··········································································.78 1.5.6 vector 的实现原理 ·······································································.80 1.6 树·····································································································.82 1.6.1 树的相关概念 ············································································.82 1.6.2 树的性质 ··········································································1