2022年数据结构知识点总结整理资料2 .pdf
《2022年数据结构知识点总结整理资料2 .pdf》由会员分享,可在线阅读,更多相关《2022年数据结构知识点总结整理资料2 .pdf(31页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、数据结构知识点总结整理资料0、常考基础必知必会A.排序:排序有几种,各种排序的比较,哪些排序是稳定的,快排的算法;B.查找:哈希查找、二叉树查找、折半查找的对比,哈希映射和哈希表的区别?C.链表和数组的区别,在什么情况下用链表什么情况下用数组?D.栈和队列的区别?E.多态,举例说明;overload 和 override 的区别?F.字符串有关的函数,比如让你写一个拷贝字符串的函数啊,或者字符串反转啊什么的。strcpy 和 memcpy?G.继承、多继承?H.面向对象有什么好处?I.说说static 的与众不同之处,如果一个变量被声明为static,它会被分配在哪里?在什么时候分配空间等?J
2、.什么是虚函数、纯虚函数、虚的析构函数,用途?K.内存泄漏及解决方法?网络部分:OSI 模型 7 层结构,TCP/IP 模型结构?B.TCP/UDP 区别?C.TCP 建立连接的步骤?D.香农定理?1、二叉树三种遍历的非递归算法(背诵版)本贴给出二叉树先序、中序、后序三种遍历的非递归算法,此三个算法可视为标准算法,直接用于考研答题。1.先序遍 历非递 归算法#define size 100 typedef struct Bitree Elemsize;int top;SqStack;void PreOrderUnrecBitree t SqStack s;StackInits;pt;while
3、 p!null|!StackEmptys while p!null/遍 历 左 子 树visitep-data;pushs,p;pp-lchild;/endwhile if!StackEmptys /通过下一次循环中的内 嵌while 实 现 右 子 树 遍 历ppops;pp-rchild;/endif/endwhile/PreOrderUnrec 2.中序遍 历非递 归算法#define size 100 typedef struct Bitree Elemsize;int top;文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T
4、5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F
5、6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1
6、X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N
7、9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G1
8、0F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1
9、A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W
10、4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1文档编码:CN2W4N9T5Q6 HD2G5G10F6I9 ZS2X5O1A1X1SqStack;void InOrderUnrecBitree t SqStack s;StackInits;pt;while p!null|!StackEmptys while p!null/遍历左子树 pushs,p;pp-lchild;/endwhile if!StackEmptys ppops;visitep-data;/访 问 根 结 点pp-rchild;/
11、通 过 下 一 次 循 环 实 现 右 子 树 遍 历/endif/endwhile /InOrderUnrec 3.后序遍 历非递 归算法#define size 100 typedef enumL,R tagtype;typedef structBitree ptr;tagtype tag;stacknode;typedef struct stacknode Elemsize;int top;SqStack;/后序遍历void PostOrderUnrecBitree t SqStack s;stacknode x;StackInits;pt;do while p!null/遍历左子树 x
12、.ptr p;x.tag L;/标记为左子树 pushs,x;pp-lchild;while!StackEmptys&s.Elems.top.tagR x pops;p x.ptr;visitep-data;/tag 为 R,表示右子树访问完毕,故访文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编
13、码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档
14、编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文
15、档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9
16、文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L
17、9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2
18、L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y
19、2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9问根结点 if!StackEmptys s.Elems.top.tag R;/遍历右子树 ps.Elems.top.ptr-rchild;while!StackEmptys;/PostOrderUnrec 4.层次遍 历算法/二叉树的数据结构structBinaryTree int value;/不写模板了,暂时用整形代替节点的数据类型BinaryTree*left;BinaryTree*right;BinaryTre
20、e*root;/已知二叉树的根节点/层次 遍历voidLevel const BinaryTree*root Queue*buf new Queue;/定义一个空队列,假设此队列的节点数据类型也是整形的 BinaryTree t;/一个临时变量 buf.push_backroot;/令根节 点 入 队while buf.empty false/当 队 列 不 为 空p buf.front;/取出队列的第一个元素 coutp-value;if p-left!NULL /若左子树不空,则令其入队 q.push p-left;if p-right!NULL /若右子树不空,则令其入队 q.push
21、p-right;buf.pop;/遍历过的节点出队 coutendl;2、线性表(1)性表的链式存储方式及以下几种常用链表的特点和运算:单文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7
22、 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B
23、7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8
24、B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T
25、8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5T8B7 HT10K1C6B10A4 ZH10N7Z2Y2L9文档编码:CZ5K5P5
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年数据结构知识点总结整理资料2 2022 数据结构 知识点 总结 整理 资料
限制150内