diff --git a/1.md b/1.md new file mode 100644 index 00000000..22ee39cf --- /dev/null +++ b/1.md @@ -0,0 +1,32 @@ +##### [点击下载本项目全部内容 提取码:【8f8b】 包括:1、我写的图解算法题典 2、千本开源电子书 3、百张思维导图 4、BAT/TMD 大厂面经 (如果链接失效,上方扫码回复即可)](https://www.geekxh.com/github_click.html?6072) + +#### 本项目还包括 I(支持下载): + +> 千本开源电子书覆盖了你在IT行业发展可以用到的大部分资料,百张思维导图按照专题对各类计算机知识进行了整合。**由于文件过大,建议通过下方扫码,回复【999】获取** + +- 📚 [一千本开源电子书](https://github.com/geekxh/hello-algorithm/tree/master/%E6%B8%85%E6%99%B0%E7%89%88%E7%94%B5%E5%AD%90%E4%B9%A61000%E6%9C%AC) +- 🐒 [百张思维导图集锦](https://github.com/geekxh/hello-algorithm/tree/master/%E8%B6%85%E6%B8%85%E6%80%9D%E7%BB%B4%E5%AF%BC%E5%9B%BE100%E5%BC%A0) + +#### 本项目还包括 II(支持下载): + +> 大厂面经汇总覆盖了阿里、京东、华为、字节、滴滴、百度、美团、腾讯 等公司的面试题,按照 公司/专题 两个维度对面试题进行了整合。**由于文件过大,建议通过下方扫码,回复【面经】获取。** + +
+
+ +
+
+ +### 使用指南 + +1、因为本教程完全免费,但现在被一些不良商家拿去卖钱, 所以我需要你先帮我点一个 star ,助力原创,防止更多人上当受骗,也顺便支持我一下。 + +2、算法训练包括三部分:① 算法知识基础 ② 图解算法题典 ③ 算法知识扩展 + +3、如果是以面试为目的,可以直接对第二部分进行学习。如果基础薄弱,建议从第一部分进行学习。第三部分为专题学习,包含大部分算法资料。 + +4、对于其中题目有疑惑,可以加入我们的万人刷题群,群里可内推 BAT。扫上面那只熊,回复【进群】即可。 + +5、当然,也许你就想加我的私人微信: [个人名片](https://www.geekxh.com/contact.jpeg) + +PS:该项目包括了你在 IT 行业发展可以用到的绝大部分资料。但我希望大家不要当收藏党,找到适合自己的才重要。 \ No newline at end of file diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/1_\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/1_\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266/README.md" new file mode 100644 index 00000000..85f23e32 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/1_\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266/README.md" @@ -0,0 +1,642 @@ +[下载 XMIND + PDF 完整版](https://www.cxyhub.com/all/programming/12460/) + +知识框架梳理(下面的内容是直接导出的,前后顺序可能有点混乱,不妨碍学习。若想保证最好的学习效果,直接下载上方 xmind 体验会更好): + +``` +B树 + 平衡的多叉树 + 性质 + 根结点至少有两个孩子 + 每个非根结点至少有M/2(上取整)个孩子,至多有M个孩子 + 每个非根结点至少有M/2-1(上取整)个关键字,并且以升序排列 + key[i]和key[i+1]之间的孩子结点的值介于key[i]、key[i+1]之间 + 所有的叶子结点都在同一层 + B+树 + 性质 + 其定义基本与B树相同 + 非叶子节点的子树指针与关键字个数相同 + 非叶子结点的子树指针P[i],指向关键字值属于[k[i],k[i+1])的子树 + 为所有叶子节点增加一个链指针 + 所有关键字都在叶子节点出现 + 搜索 + 和B树基本相同 + 特性 + 所有关键字都出现在叶子节点的链表中(稠密索引),且链表中的关键字恰好是有序的 + 不可能在叶子结点命中 + 非叶子节点相当于是叶子结点的索引(稀疏索引),叶子结点相当于是存储(关键字)数据的数据层 + 更适合文件索引系统 + B*树 + 在B+树的非根和非叶子结点之间再增加指向兄弟的指针 + 子主题 2 + +哈希 + 搜索(检索) + 在数据元素集合中查找是否存在关键字等于某个给定关键字数据元素的过程 + 结果 + 成功 + 失败 + 搜索结构 + 用于搜索的数据集合 + 搜索的环境 + 静态环境 + 在执行插入和删除等操作的前后搜索结构不会发生改变 + 动态环境 + 为保持较高的搜索效率,搜索结构在执行插入和删除等操作的前后将自动调整,结构可能会发生改变 + 查找 + 静态查找 + 顺序表 + 从前往后依次遍历O(n) + 有序顺序表 + 二分查找O(log(n)) + 索引顺序表 + 动态查找 + 二叉树结构 + 二叉排序树 + 平衡二叉树 + 树结构 + B树 + B+树 + 哈希查找 + 每个元素的关键码和结构中一个唯一的结存储位置相对应 + 散列方法 + 插入和查找数据利用哈希函数求出存储位置再存放或者查找 + 哈希冲突 + 对于两个数据Ki和Kj(i!=j),Ki!=Kj,但是有Hash(Ki)==Hash(Kj) + 散列函数 + 哈希函数的定义域必须包括需要存储的全部关键码,而如果散列表允许有m个地址时,其值域必须在0-m-1之间 + 哈希函数计算出来的地址能均匀的分布在整个空间中 + 哈希函数应该比较简单 + 常见哈希函数 + 直接定址法 + 取关键字的某个线性函数为散列地址 + 优点:简单均匀 + 缺点:需要事先直到关键字的分布情况 + 使用场景:适合查找比较小且连续的情况 + 除留余数法 + 设散列中允许的地址数为m,取一个不大于m,但最接近或者等于m的质数p作为除数,按照哈希函数:Hash(key)=key%p,p<=m;将关键码转换成哈希地址 + 平方取中法 + 假设关键字是1234,平方就是1522756,再抽取中间的三位数227作为散列地址 + 折叠法 + 将关键字从左到右分成位数相等的几部分,然后将这几部分叠加求和,并按散列表长,取后几位作为散列地址 + 随机数法 + 选择一个随机函数,取关键字的随机函数值为它的哈希地址 + 数学分析法 + 设有n个d位数,每一位肯能有r种不同的符号,这r种不同的符号在各位上出现的频率不一定相同,可能在某些位上分布比较均匀,可将分布均匀的几位根据开散列的方式作为散列地址 + 散列冲突处理方法 + 闭散列法 + 一旦发生冲突,就去寻找下一个空的散列表地址,只要散列表足够大,空的散列地址总能知道 + 线性探查 + 插入时发现该位置的数据和要插入数据相等,不插入 + 产生冲突,依次查看其后的下一个桶,如果有空位置插入数据 + 二次探查 + 使用二次探查法,在表中寻找下一个空位置的公式是H(i)=(H0+i^2)%m,H(i)=(H0-i^2)%m + 当表的长度为质数且转载因子不超过0.5时,新的表项一定能插入 + 双散列法 + 需要两个散列函数,当一个发生冲突时,利用下一个散列函数计算偏移量 + 载荷因子 + a=填入表中的元素个数/散列表的长度 + 控制在0.7-0.8以下,超过0.8,查表时CPU缓存指数上升 + 开散列法 + 首先对关键码集合用散列函数计算散列地址,具有相同地址的关键码归于同一子集合,每个子集合称为一个桶,各个桶中的元素通过一个单链表链接起来,各链表的头结点组成一个向量,向量的元素个数与可能的桶数相同 + 布隆过滤器 + 当一个元素被加入集合时,通过k个散列函数将这个元素映射成一个位数组中的k个点,将它们置为1,检索时只要看是不是都是1,就可以,只要有一个零就不是,全是1,可能是 + +排序 + 概念 + 就是将一组杂乱无章的数据按照一定的规律(升序或降序)组织起来 + 数据表 + 待排序数据元素的有限集合 + 排序码 + 通常数据元素有多个属性域,其中有一个数据域可用来区分元素,作为排序依据,该域即为排序码 + 如果在数据表中各个元素的排序码互不相同,这种排序码称为主排序码 + 排序算法的稳定性 + 两个元素R[i]R[j],它们排序码K[i]==K[j],且在排序之前,元素R[i]在R[j]之前,元素在R[i]和R[j]的顺序不变 + 常见排序算法 + 插入排序 + 直接插入排序 + 插入到已排序序列中,先找位置,然后将位置之后得元素后移 + 稳定 + 希尔排序 + 缩小增量排序 + 选择排序 + 选择排序 + 每次把最小的元素换在最前面 + 锦标赛排序 + 一直两两比较找出获胜者,将这个不再比较,其他继续两两比较,取得获胜者,一直循环 + 不稳定 + 堆排序 + 升序创建大堆,否则创建小堆 + 不稳定 + 交换排序 + 冒泡排序 + 稳定 + 依次比较相邻两个元素,不满足条件交换 + 快速排序 + 取一个基准值将比它小得放在左侧,大的放在右侧。左右两部分递归取基准值继续分 + 归并排序 + 归并排序 + 将待排序的序列分成两个等长的子序列,然后将它们合并成一个序列 + 非比较排序 + 计数排序 + 基数排序 + +图 + 由顶点集合及顶点间关系组成的一种数据结构 + 顶点和边 + 顶点 + 图中结点称为结点 + 边 + 顶点与顶点之间有一条边 + 图的分类 + 有向图 + 在有向图中,顶点对是有序的是不同的两条边 + 无向图 + (x,y)(y,x)是一条边 + 完全图 + 在有n个顶点的无向图中,若有n*(n-1)/2条边,即任意两个两个顶点之间有且只有一条边 + 在n个顶点的有向图中,若有n*(n-1)条边,即任意两个顶点之间有且仅有方向相反的边 + 邻接结点 + 在无向图中G中,若(u,v)是E(G)中的一条边,则称u和v互为邻接顶点,并称(u,v)依附于顶点u和v + 在有向图G中,若是E(G)中的一条边,则称顶点u邻接到v,顶点v邻接自顶点u,并称边与顶点u和v相关联 + 顶点的度 + 与它相关联的边的条数 + 在有向图中,顶点的度等于该顶点的入度与出度之和,其中顶点v的入度是以v为终点的有向边的条数,记做indev(v)顶点v的出度是以v为起始点的有向边的条数记做outdev(v) + 无向图的度等于入度和出度 dev(v) = indev(v) = outdev(v) + 路径 + 在图G=(V,E)中,若从顶点vi出发有一组边使其可到达顶点vj,则称顶点vi到vj的顶点序列为从顶点vi到顶点vj的路径 + 权 + 边附带的数据信息 + 路径长度 + 对于不带权的图,一条边的路径长度是指该路径上的边的条数 + 对于带权的图,一条路径的长度是指一条路径的路径长度是指该路径上各个边权值的总和 + 简单路径与回路 + 如路径上各个顶点 均不重复,则称这样的路径是简单路径,若路径上第一个顶点v1和最后一个顶点vm重合,则称这样的路径为回路或环 + 子图 + 设图G={V,E}和图G1={V1.E1},若V1属于V且E1属于E,则称G1是G的子图 + 连通图 + 无向图中,两个顶点之间有路径就是连通的,任一对顶点之间都是连通的则称这个图是连通图 + 强连通图 + 在有向图中,任意一对顶点vi和vj之间都存在一条从vi到vj的路径,也存在一条从vj到vi的一条路径 + 生成树 + 一个连通图的最小连通子图称作该图的生成树,有n个顶点的连通图的生成树有n个顶点和n-1条边 + 图的存储结构 + 邻接矩阵 + 邻接表 + 无向图 + 有向图 + 图的遍历 + 深度优先 + 广度优先 + 连通分量 + 当无向图为非连通图时,从图中某一顶点出发,利用深度优先搜索或广度优先搜索算法无法遍历图的所有顶点,而只能访问到该节点所在的最大连通子图的所有顶点,这些顶点构成一个连通分量 + 最小生成树 + 准则 + 只能使用图中的边来构造最小生成树 + 只能使用恰好n-1条边来连接图中的n个顶点 + 选用的n-1条边不能构成回路 + 贪心算法 + 在问题求解时,总是做出当前看起来最好的选择,也就是局部最优解 + Kruskal算法 + 每次找一条具有最短权值且不再同一连通分量上的边加入生成树 + prime算法 + 挨着找 + 单元最短路径 + 从在带权图的某一顶点出发,找出一条通往另一个顶点的最短路径,最短也即是沿路径各边的权值和最小 + +初识数据结构 + 概念 + 数据 + 描述客观事物的符号,是计算机中可以操作的对象,能被计算机识别,并输入给计算机处理的符号集合 + 数据元素 + 是组成数据的、有一定意义的基本单位,在计算机通常作为整体处理,也被称为记录 + 数据项 + 一个数据元素可以由若干个数据项组成。数据项是数据不可分隔的最小单位 + 数据结构形式 + 数据结构 + 是相互之间存在一种或多种特定关系的数据元素的集合 + 分类 + 逻辑结构 + 集合结构 + 线性结构 + 树形结构 + 图形结构 + 物理结构 + 顺序存储结构 + 链式存储结构 + 具体概念 + 逻辑结构 + 数据对象中数据元素之间的相互关系 + 集合结构 + 集合中的数据元素除了同属一个集合外,它们之间没有其他关系 + 线性结构 + 数据元素之间是一对一的关系 + 树形结构 + 数据元素之间存在的一种一对多的层次关系 + 图形结构 + 数据元素是多对多的关系 + 物理结构 + 数据的逻辑结构在计算机中的存储形式 + 顺序存储结构 + 数据元素存放在地址连续的存储单元里,其数据间的逻辑关系和物理关系是一致的 + 链式存储结构 + 数据元素存放在任意的存储单元里,存储单元可以是连续的,也可以是不连续的 + 逻辑结构是面向问题的,物理结构是面向计算机的,其基本的目标就是将数据及其逻辑关系存储到计算机的内存中 + 程序 + 算法 + 数据结构 + 算法 + 解决特定问题求解步骤的描述,在计算机中表现为指令的有限序列,并且每条指令表示一个或多个操作 + 算法特性 + 输入 + 算法有零个或多个输入 + 输出 + 至少有一个或多个输出 + 有穷性 + 算法在执行有限的步骤之后,自动结束而不会出现无限循环,并且一个步骤在可接受的时间内完成 + 确定性 + 算法的每一个步骤都有确定含义,不会出现二义性 + 可行性 + 算法的每一步都必须是可行的,也就是说,每一步都能够通过执行有限次数完成 + 设计算法要求 + 正确性 + 可读性 + 健壮性 + 时间效率高 + 且空间使用率低 + 简单性 + +算法的复杂度 + 时间复杂度 + 空间复杂度 + 算法分析的分类 + 平均情况 + 任意输入规模的期望运行次数 + 最坏情况 + 任意输入规模的最大运行次数 + 最好情况 + 任意输入规模的最小运行次数,通常最好情况不会出现 + 时间复杂度--O渐进表示法 + 一般算法O(n)计算法 + 用常数1取代运行时间中的所有加法常数 + 在修改后的运行次数函数中,只保留最高阶项 + 如果最高阶项系数存在且不是1,则去除与这个项相乘的常数 + 分治算法的时间复杂度计算 + 二分搜索算法的时间复杂度是lgN + M分搜索算法的时间复杂度为logM^N + 递归算法的时间复杂度计算 + 递归总次数*每次递归次数 + 递归算法空间复杂度算法 + N*每次递归空间大小 + +递归 + 递归定义 + 若一个对象部分的包含它自己或者用它自己给自己定义,则称这个对象是递归的 + 递归的过程 + 一个过程直接或间接的调用自己 + 递归的思想 + 把问题分解成规模更小的具有与原来问题具有相同解法的小问题 + 递归条件 + 缩小问题规模,使新问题与原问题具有相同的解决方式 + 设置递归的出口 + 递归分类 + 数据结构递归 + 问题解法递归 + 递归调用栈 + 尾递归 + 递归调用返回的结果总被直接返回 + 尾递归的本质 + 将单次计算的结果缓存起来,传递给下一次调用,相当于自动累积 + 时间复杂度 + 递归总次数*每次递归次数 + 回溯法 + 基本思想 + 迷宫算法 + 递归的优缺点 + 优点 + 递归在解决某些问题的时候使得我们思考的方式的以简化,代码也更加简练,容易阅读 + 缺点 + 递归的实质就是自己调用自己,而函数的调用开销是很大的,系统要为每次函数调用分配空间存储空间,并将调用点信息压栈,而在函数的调用结束后,还要释放空间,弹栈恢复断点,如果递归方案的复杂度 + +栈 + 栈的概念 + 一种特殊的线性表,只允许从一端插入和删除数据 + 特点:后进先出 + 顺序栈 + 顺序堆栈和书序表数据成员相同 ,不同之处,顺序堆栈的入栈和出栈操作只允许对当前栈顶进行 + 共享栈 + 一个数组实现两个栈 + 原理 + 既然是两个栈共享一段空间,向中间靠拢,数组两端表示两个栈的栈底,栈顶一直向中间靠近 + 应用场景 + 两个栈空间需求有相反的关系,也就是一个增长一个缩短的场景 + 链式栈 + 头插头删 + 栈的应用 + 括号匹配 + 逆波兰表达式 + 迷宫算法 + +队列 + 只允许在一端插入数据,在另一端删除数据的特殊线性表 + 顺序队列 + 实现方式一 + 队头不动出队列时所有元素向前移动 + 实现方式二 + 出队列时,队头向后移动一个位置 + 假溢出现象 + 多次入队列、出队列操作后出现的尚有存储空间但不能进行入队列操作的溢出 + 真溢出现象 + 最大存储空间已经存储满,继续进行入队列操作 + 循环队列 + 头尾相接的顺序存储队列就是循环队列 + 队列满队列空的判断 + 少用一个存储空间 + 队尾指针加一等于队头指针就是队列满的判断条件 + 判空条件是尾和头相等 + 设计一个标记flag + 初始flag置为0,入队列成功flag=1,出队列成功flag置为0 + 队空条件rear==front&&flag==0, + 堆满条件rear==front&&flag=1 + 设置一个计数器 + 初始时count=0,入队列成功,count+1,出队列成功count-1 + 队列空的条件count==0 + 队列满的条件count>0&&rear==front或者count == MaxSize + 链式队列 + 队列的链式存储结构,其实就是线性表的单链表,只不过它只能尾进,头出而已 + 优先级队列 + 带有优先级的队列 + 优先级高的先出队列,优先级相同的遵守先进先出规则 + 队列的应用 + 生产者消费者模型 + 消息队列 + 排队现象 + 网络数据传输 + +矩阵 + 特殊矩阵 + 有很多值相同的元素或有许多零元素,且值相同的元素或零元素的分布有一定规律的矩阵 + 对称矩阵 + 一个N*N矩阵,任意Aij = Aji + 对称矩阵压缩存储 + 由于对称矩阵上三角和下三角是相同的所以只需存一半即可 + 对称矩阵和对称压缩存储的关系 + 下三角 + i>jSymmetricMatrix[i][j] == Array[i*(i+1)/2+j] + 稀疏矩阵 + M*N矩阵,矩阵有效值的个数远小于无效值的个数,分布没有规律 + 稀疏矩阵压缩存储 + 只存储少量的有效值 + 使用{row,col,value}三元组按照数组中的位置,以行优先级先后顺序一次存放 + 矩阵逆置 + 行列互换 + 快速逆置 + +初识树 + 树的基本概念 + 由N个节点(N>=0)构成的集合 + 有一个特殊的节点,称为根节点,根节点没有前驱节点 + 除过根节点外,其余节点别分成M个(M>0)个互不相交的集合T1、T2...Tn,其中每一个集合又是一棵与树结构类似的子树 + 树是递归定义的 + 名词解释 + 结点 + 结点包括一个数据元素及若干指向其他子树的分支(指针(索引)) + 结点的度 + 结点所拥有的的子树的个数 + 度为0的结点 + 又称终端节点 + 分支结点 + 度不为零的结点 + 非终端结点 + 祖先结点 + 从根结点到该结点所经分支上的所有结点 + 子孙结点 + 以某结点为根结点的子树中的所有结点 + 双亲结点 + 树中某结点有孩子节点,该结点称为它孩子节点的双亲结点 + 孩子结点 + 树中一个结点的子树的根结点称为该结点的孩子结点 + 兄弟结点 + 具有相同双亲结点的结点 + 树的度 + 树中所有结点的度的最大值 + 结点的层次 + 从根结点到树中某结点所经路径上的分支数 + 树的深度 + 树中所有结点的层次的最大值 + 有序树 + 树中结点的各棵子树T0,T1...是有序的 + 无序树 + 树中结点的各棵子树之间的次序不重要,可以相互交换位置 + 森林 + 树m棵树的集合 + 树的表示方法 + 目录结构 + 集合文氏图 + 树的存储结构 + 双亲表示法 + 用指针表示出每个结点的双亲结点 + 优点 + 寻找一个结点的双亲结点操作实现很方便 + 缺点 + 寻找一个结点的孩子结点很不方便 + 孩子表示法 + 用指针指出每个结点的孩子结点 + 优点 + 寻找一个结点的孩子结点比较方便 + 缺点 + 寻找一个结点的双亲结点很不方便 + 双亲孩子表示法 + 用指针既表示出每个结点的双亲结点,也表示出每个结点的孩子结点 + 孩子兄弟表示法 + 表示出第一个结点的第一个孩子结点,也表示出每个结点的下一个兄弟结点 + 树的应用 + 电脑的目录 + +树之二叉树 + 概念 + 一棵二叉树是结点的一个有限集合,该集合或者为空,或者是由一个根节点加上两棵分别称为左子树和右子树的二叉树组成 + 特点 + 每个结点最多有两棵子树 + 二叉树的子树有左右之分,其次序不能颠倒 + 满二叉树 + 所有分支结点都存在左子树和右子树,并且所有叶子结点都在同一层上 + 完全二叉树 + 如果一棵具有N个结点的二叉树的结构与满二叉树的前N个节点 的结构相同,称为完全二叉树 + 二叉树的性质、 + 若规定根节点的层次为1,则一棵非空二叉树第i层上最多有2^(i-1)(i>=1)个结点 + 若规定只有根节点的二叉树的深度为1,则深度为K的二叉树的最大结点数是2^k-1 (k>=0) + 对任何一棵二叉树,如果其叶结点个数为n0,度为2的非叶结点个数为n2,则有n0 = n2+1 + 具有n个结点的完全二叉树,如果按照从上至下从左到右的顺序对所有结点从0开始编号,则对于序号为i的结点有: + 如果i>0,则序号为i的结点的双亲结点的序号为(i-1)/2,如果i==0,则序号为i的结点为根节点,无双亲结点 + 如果2i+1=n,则序号为i结点无右孩子结点 + 如果2i+2=n,则序号为i结点无右孩子结点 + 二叉树的存储结构 + 顺序存储 + 优点、 + 存储完全二叉树,简单省空间 + 缺点 + 对一般二叉树尤其单支树,存储空间利用不理想 + 链式存储 + 子主题 1 + 仿真指针(静态链表) + 二叉树的基本操作 + 二叉树的创建 + 二叉树的遍历 + 前序 + 中序 + 后序 + 层序 + 初始化一个队列 + 把根节点的指针入队列 + 当队列非空时循环执行 + 出队列取一个节点 + 若该结点的左子树非空,将该节点的左子树指针入队列 + 若该节点的右子树非空将该节点的右子树入队列 + 结束 + +线索化二叉树 + 线索化概念 + 按照二叉树的遍历将二叉树导成一个线性序列 + 普通二叉树可能存在的问题 + 递归遍历有可能导致栈溢出 + 非递归版本可能会降低程序的效率 + 想要找到某种遍历形式下某个节点的前驱还是后继比较难 + 树中有大量的空指针域造成浪费, + 线索化过程 + 当某结点的左指为空时,令该指针指向按照某种方式遍历二叉树时得到该结点的前驱节点 + 当某结点的右指针为空时,令该指针指向按照某种遍历方式遍历二叉树时得到该结点的后继结点 + 线索标志位 + 作用区分是孩子结点还是前驱或者后继 + leftThread + 0 + leftChild + 1 + leftThread + rightThread + 0 + rightChild + 1 + rightThread + 线索 + 结点中指向前驱或者后继结点的指针 + 线索二叉树 + 二叉树的结点加上线索的二叉树 + 对二叉树按照某种方式(前序、中序、后序)遍历使其称为线索二叉树的过程称为按照什么方法对二叉树进行线索化 + +堆 + 堆的概念 + 把所有的元素按照完全二叉树的方式存储在一个一维数组中并满足Ki<=K2*i+1且Ki<=K2*i+2(Ki>=K2*i+1且Ki>=K2*i+2),这个堆称为最小堆(最大堆) + 堆的分类 + 小堆 + 任一节点的关键码均小于它左右孩子的关键码,位于堆顶结点的关键码最小 + 大堆 + 任一结点的关键码均大于它左右孩子的关键码,位于堆顶结点的关键码最大 + 堆的性质 + 如果i=0,结点i是根结点,没有双亲结点,否则结点i的双亲结点为(i-1)/2 + 如果2*i+1>n-1,则结点i无左孩子,否则结点i的左孩子为节点2*i+1 + 如果2*i+1>n-1,则结点i无左孩子,否则结点i的左孩子为节点2*i+2 + 堆的创建 + 从上向下调整 + 堆的插入 + 堆的删除 + 堆的应用 + 优先级队列 + +Huffman树 + 概念 + 路径 + 路径长度 + 把带权路径长度最小的树叫做Huffman树 + 构造huffman树 + 构造n棵只有根结点的二叉树森林,每棵二叉树都只有一个带有权值的根结点 + 重复以下步骤,直到F中只剩下一棵树 + 在二叉树森林中选最小的两个,作为左右子树构建一棵新的二叉树,新二叉树的根结点的权值为左右子树根结点的权值之和 + 在原来二叉树森林里删除这两棵二叉树 + 把新的二叉树加入二叉树森林 + huffman编码 + 编码 + 在数据通信中经常把传输的文字转换成二进制字符0和1组成的二进制串,这叫做编码 + 等长编码 + 不等长编码 + 文件压缩 + +二叉搜索树 + 性质 + 如果左子树不为空,则左子树上所有节点的值都小于根结点的值 + 它的右子树不为空,则右子树上所有节点的值都大于根结点的值 + 它的左右子树也分别为二叉搜索树 + 操作 + 搜索 + 若根结点不为空 + 根结点key==要查找的key,返回true + 根结点key>查找key,在其左子树查找 + 根结点key<查找key,在其右子树查找 + 否则返回false + 插入 + 首先检测这个节点是不是已经存在,要是存在不插入 + 否则将元素插入到找到的位置 + 删除 + 首先判断是否在树中,没有直接返回 + 有的情况 + 要删除的节点没有孩子节点 + 直接删除该结点 + 要删除的节点只有左孩子 + 删除该结点并使被删除结点的双亲结点指向被删除结点的左孩子结点 + 要删除的节点只有右孩子 + 删除该结点并使被删除结点的双亲结点指向被删除结点的右孩子结点 + 要删除的节点有左、右孩子结点 + 在它的右子树中寻找中序下的第一个结点(关键码最小),用它的值填补到被删除节点中,再来处理该结点的删除问题 + 二叉搜索树性能分析 + 最坏情况下,平均查找长度为O(n)一般情况下平均长度为O(lgn) + +AVL树 + AVL树性质 + 它的左右子树都是AVL树 + 左子树和右子树高度之差(简称平衡因子)的绝对值不超过1(-1、0、1) + 如果一棵树是高度平衡的,它就是AVL树。如果它有n个节点,其高度可保持在0(lgn),平均搜索复杂度O(lgn) + 平衡化旋转 + 左单旋 + 右单旋 + 左右双旋 + 右左双旋 + AVL树的插入 + 如果是空树,插入后即为根结点,插入后直接返回true + 如果树不空,寻找插入位置,若在查找过程中找到key,则插入失败直接返回false + 插入节点 + 更新平衡因子,对树进行调整 + AVL树的删除 + 被删除结点只有左孩子 + parent的平衡因子为1或者-1,parent高度不变,则从parent到根所有结点高度均不变,不用调整 + 被删除结点只有右孩子 + parent的平衡因子变成0,虽然以parent为根的子树平衡,其高度减1,但需要检查parent的双亲结点的平衡性 + 被删除结点左右孩子都有 + 变为删除中序遍历下的第一个结点q + 结点parent的平衡因子为2或者-2,则较矮子数缩短,parent发生不平衡,需要进行平衡化旋转 + parent较高子树的根为q + 如果q的平衡因子为0,执行单循环恢复parent + 如果q的平衡因子与parent平衡因子(正负)号相同,则执行一个单循环恢复parent + 如果q的平衡因子与parent平衡因子(正负)号相反,则执行一个双旋转恢复parent + +红黑树 + 概念 + 红黑树是一棵二叉搜索树,它在每个节点上增加了一个存储位来表示结点的颜色,保证最长路径不超过最短路径的两倍,近似平衡 + 性质 + 每个结点不是红色就是黑色 + 树的根结点是黑色 + 如果一个结点是红色的,则它的两个孩子结点是黑色的(没有连续的两个红色结点) + 对于每个节点,从该结点到其所有后代叶节点的简单路径上,均包含相同数目的黑色结点(每条路径上黑色结点的数量相等) + 每个叶子节点都是黑色的(此处的叶子结点指的是空节点) + 插入实现 + 若树为空,插入后需将新节点改成黑色 + 插入结点的父节点为黑色,不违反任何性质,直接插入 + 情况三 + 情况四 + 情况五 + 删除 + 运用 + C++STL库--map/set multimap multiset + Java库 + linux 内核 + 其他一些库 + 红黑树和AVL树的比较 +``` diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/1_\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266/\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266.pdf" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/1_\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266/\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266.pdf" new file mode 100644 index 00000000..37ef7e51 Binary files /dev/null and "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/1_\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266/\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266.pdf" differ diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/doubly-linked-list/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/doubly-linked-list/README.md" new file mode 100644 index 00000000..03dd53c1 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/doubly-linked-list/README.md" @@ -0,0 +1,99 @@ +# 双向链表 + +在计算机科学中, 一个 **双向链表(doubly linked list)** 是由一组称为节点的顺序链接记录组成的链接数据结构。每个节点包含两个字段,称为链接,它们是对节点序列中上一个节点和下一个节点的引用。开始节点和结束节点的上一个链接和下一个链接分别指向某种终止节点,通常是前哨节点或null,以方便遍历列表。如果只有一个前哨节点,则列表通过前哨节点循环链接。它可以被概念化为两个由相同数据项组成的单链表,但顺序相反。 + +![Doubly Linked List](https://upload.wikimedia.org/wikipedia/commons/5/5e/Doubly-linked-list.svg) + +两个节点链接允许在任一方向上遍历列表。 + +在双向链表中进行添加或者删除节点时,需做的链接更改要比单向链表复杂得多。这种操作在单向链表中更简单高效,因为不需要关注一个节点(除第一个和最后一个节点以外的节点)的两个链接,而只需要关注一个链接即可。 + + + +## 基础操作的伪代码 + +### 插入 + +```text +Add(value) + Pre: value is the value to add to the list + Post: value has been placed at the tail of the list + n ← node(value) + if head = ø + head ← n + tail ← n + else + n.previous ← tail + tail.next ← n + tail ← n + end if +end Add +``` + +### 删除 + +```text +Remove(head, value) + Pre: head is the head node in the list + value is the value to remove from the list + Post: value is removed from the list, true; otherwise false + if head = ø + return false + end if + if value = head.value + if head = tail + head ← ø + tail ← ø + else + head ← head.next + head.previous ← ø + end if + return true + end if + n ← head.next + while n = ø and value !== n.value + n ← n.next + end while + if n = tail + tail ← tail.previous + tail.next ← ø + return true + else if n = ø + n.previous.next ← n.next + n.next.previous ← n.previous + return true + end if + return false +end Remove +``` + +### 反向遍历 + +```text +ReverseTraversal(tail) + Pre: tail is the node of the list to traverse + Post: the list has been traversed in reverse order + n ← tail + while n = ø + yield n.value + n ← n.previous + end while +end Reverse Traversal +``` + +## 复杂度 + +## 时间复杂度 + +| Access | Search | Insertion | Deletion | +| :-------: | :-------: | :-------: | :-------: | +| O(n) | O(n) | O(1) | O(1) | + +### 空间复杂度 + +O(n) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Doubly_linked_list) +- [YouTube](https://www.youtube.com/watch?v=JdQeNxWCguQ&t=7s&index=72&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/graph/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/graph/README.md" new file mode 100644 index 00000000..49c97715 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/graph/README.md" @@ -0,0 +1,22 @@ +# 图 + +在计算机科学中, **图(graph)** 是一种抽象数据类型, +旨在实现数学中的无向图和有向图概念,特别是图论领域。 + +一个图数据结构是一个(由有限个或者可变数量的)顶点/节点/点和边构成的有限集。 + +如果顶点对之间是无序的,称为无序图,否则称为有序图; + +如果顶点对之间的边是没有方向的,称为无向图,否则称为有向图; + +如果顶点对之间的边是有权重的,该图可称为加权图。 + + + +![Graph](https://www.tutorialspoint.com/data_structures_algorithms/images/graph.jpg) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Graph_(abstract_data_type)) +- [Introduction to Graphs on YouTube](https://www.youtube.com/watch?v=gXgEDyodOJU&index=9&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) +- [Graphs representation on YouTube](https://www.youtube.com/watch?v=k1wraWzqtvQ&index=10&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/hash-table/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/hash-table/README.md" new file mode 100644 index 00000000..5de3cc5e --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/hash-table/README.md" @@ -0,0 +1,21 @@ +# 哈希表 + +在计算中, 一个 **哈希表(hash table 或hash map)** 是一种实现 *关联数组(associative array)* +的抽象数据;类型, 该结构可以将 *键映射到值*。 + +哈希表使用 *哈希函数/散列函数* 来计算一个值在数组或桶(buckets)中或槽(slots)中对应的索引,可使用该索引找到所需的值。 + +理想情况下,散列函数将为每个键分配给一个唯一的桶(bucket),但是大多数哈希表设计采用不完美的散列函数,这可能会导致"哈希冲突(hash collisions)",也就是散列函数为多个键(key)生成了相同的索引,这种碰撞必须 +以某种方式进行处理。 + + +![Hash Table](https://upload.wikimedia.org/wikipedia/commons/7/7d/Hash_table_3_1_1_0_1_0_0_SP.svg) + +通过单独的链接解决哈希冲突 + +![Hash Collision](https://upload.wikimedia.org/wikipedia/commons/d/d0/Hash_table_5_0_1_1_1_1_1_LL.svg) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Hash_table) +- [YouTube](https://www.youtube.com/watch?v=shs0KM3wKv8&index=4&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/heap/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/heap/README.md" new file mode 100644 index 00000000..bdcb1940 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/heap/README.md" @@ -0,0 +1,19 @@ +# 堆 (数据结构) + +在计算机科学中, 一个 **堆(heap)** 是一种特殊的基于树的数据结构,它满足下面描述的堆属性。 + +在一个 *最小堆(min heap)* 中, 如果 `P` 是 `C` 的一个父级节点, 那么 `P` 的key(或value)应小于或等于 `C` 的对应值. + +![最小堆](https://upload.wikimedia.org/wikipedia/commons/6/69/Min-heap.png) + +在一个 *最大堆(max heap)* 中, `P` 的key(或value)大于 `C` 的对应值。 + +![堆](https://upload.wikimedia.org/wikipedia/commons/3/38/Max-Heap.svg) + + +在堆“顶部”的没有父级节点的节点,被称之为根节点。 + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Heap_(data_structure)) +- [YouTube](https://www.youtube.com/watch?v=t0Cq6tVNRBA&index=5&t=0s&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/linked-list/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/linked-list/README.md" new file mode 100644 index 00000000..81f036ab --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/linked-list/README.md" @@ -0,0 +1,147 @@ +# 链表 + +在计算机科学中, 一个 **链表** 是数据元素的线性集合, 元素的线性顺序不是由它们在内存中的物理位置给出的。 相反, 每个元素指向下一个元素。它是由一组节点组成的数据结构,这些节点一起,表示序列。 + +在最简单的形式下,每个节点由数据和到序列中下一个节点的引用(换句话说,链接)组成。这种结构允许在迭代期间有效地从序列中的任何位置插入或删除元素。 + +更复杂的变体添加额外的链接,允许有效地插入或删除任意元素引用。链表的一个缺点是访问时间是线性的(而且难以管道化)。 + +更快的访问,如随机访问,是不可行的。与链表相比,数组具有更好的缓存位置。 + +![Linked List](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg) + +## 基本操作的伪代码 + +### 插入 + +```text +Add(value) + Pre: value is the value to add to the list + Post: value has been placed at the tail of the list + n ← node(value) + if head = ø + head ← n + tail ← n + else + tail.next ← n + tail ← n + end if +end Add +``` + +``` +Prepend(value) + Pre: value is the value to add to the list + Post: value has been placed at the head of the list + n ← node(value) + n.next ← head + head ← n + if tail = ø + tail ← n + end +end Prepend +``` + +### 搜索 + +```text +Contains(head, value) + Pre: head is the head node in the list + value is the value to search for + Post: the item is either in the linked list, true; otherwise false + n ← head + while n != ø and n.value != value + n ← n.next + end while + if n = ø + return false + end if + return true +end Contains +``` + +### 删除 + +```text +Remove(head, value) + Pre: head is the head node in the list + value is the value to remove from the list + Post: value is removed from the list, true, otherwise false + if head = ø + return false + end if + n ← head + if n.value = value + if head = tail + head ← ø + tail ← ø + else + head ← head.next + end if + return true + end if + while n.next != ø and n.next.value != value + n ← n.next + end while + if n.next != ø + if n.next = tail + tail ← n + end if + n.next ← n.next.next + return true + end if + return false +end Remove +``` + +### 遍历 + +```text +Traverse(head) + Pre: head is the head node in the list + Post: the items in the list have been traversed + n ← head + while n != ø + yield n.value + n ← n.next + end while +end Traverse +``` + +### 反向遍历 + +```text +ReverseTraversal(head, tail) + Pre: head and tail belong to the same list + Post: the items in the list have been traversed in reverse order + if tail != ø + curr ← tail + while curr != head + prev ← head + while prev.next != curr + prev ← prev.next + end while + yield curr.value + curr ← prev + end while + yield curr.value + end if +end ReverseTraversal +``` + +## 复杂度 + +### 时间复杂度 + +| Access | Search | Insertion | Deletion | +| :-------: | :-------: | :-------: | :-------: | +| O(n) | O(n) | O(1) | O(1) | + +### 空间复杂度 + +O(n) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Linked_list) +- [YouTube](https://www.youtube.com/watch?v=njTh_OwMljA&index=2&t=1s&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/priority-queue/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/priority-queue/README.md" new file mode 100644 index 00000000..caffcd71 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/priority-queue/README.md" @@ -0,0 +1,15 @@ +# 优先队列 + +在计算机科学中, **优先级队列(priority queue)** 是一种抽象数据类型, 它类似于常规的队列或栈, 但每个元素都有与之关联的“优先级”。 + +在优先队列中, 低优先级的元素之前前面应该是高优先级的元素。 如果两个元素具有相同的优先级, 则根据它们在队列中的顺序是它们的出现顺序即可。 + +优先队列虽通常用堆来实现,但它在概念上与堆不同。优先队列是一个抽象概念,就像“列表”或“图”这样的抽象概念一样; + +正如列表可以用链表或数组实现一样,优先队列可以用堆或各种其他方法实现,例如无序数组。 + + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Priority_queue) +- [YouTube](https://www.youtube.com/watch?v=wptevk0bshY&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=6) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/queue/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/queue/README.md" new file mode 100644 index 00000000..d61a2c7d --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/queue/README.md" @@ -0,0 +1,15 @@ +# 队列 + +在计算机科学中, 一个 **队列(queue)** 是一种特殊类型的抽象数据类型或集合。集合中的实体按顺序保存。 + +队列基本操作有两种:入队和出队。从队列的后端位置添加实体,称为入队;从队列的前端位置移除实体,称为出队。 + + +队列中元素先进先出 FIFO (first in, first out)的示意 + +![Queue](https://upload.wikimedia.org/wikipedia/commons/5/52/Data_Queue.svg) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) +- [YouTube](https://www.youtube.com/watch?v=wjI1WNcIntg&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=3&) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/stack/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/stack/README.md" new file mode 100644 index 00000000..bd9bce4b --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/stack/README.md" @@ -0,0 +1,21 @@ +# 栈 + +在计算机科学中, 一个 **栈(stack)** 是一种抽象数据类型,用作表示元素的集合,具有两种主要操作: + +* **push**, 添加元素到栈的顶端(末尾); +* **pop**, 移除栈最顶端(末尾)的元素. + +以上两种操作可以简单概括为“后进先出(LIFO = last in, first out)”。 + +此外,应有一个 `peek` 操作用于访问栈当前顶端(末尾)的元素。 + +"栈"这个名称,可类比于一组物体的堆叠(一摞书,一摞盘子之类的)。 + +栈的 push 和 pop 操作的示意 + +![Stack](https://upload.wikimedia.org/wikipedia/commons/b/b4/Lifo_stack.png) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) +- [YouTube](https://www.youtube.com/watch?v=wjI1WNcIntg&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=3&) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/tree/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/tree/README.md" new file mode 100644 index 00000000..9a7bedb0 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/tree/README.md" @@ -0,0 +1,21 @@ +# 树 + +* [二叉搜索树](https://www.cxyhub.com/all/programming/12460/) +* [红黑树](https://www.cxyhub.com/all/programming/12460/) + +在计算机科学中, **树(tree)** 是一种广泛使用的抽象数据类型(ADT)— 或实现此ADT的数据结构 — 模拟分层树结构, 具有根节点和有父节点的子树,表示为一组链接节点。 + +树可以被(本地地)递归定义为一个(始于一个根节点的)节点集, 每个节点都是一个包含了值的数据结构, 除了值,还有该节点的节点引用列表(子节点)一起。 +树的节点之间没有引用重复的约束。 + +一棵简单的无序树; 在下图中: + +标记为7的节点具有两个子节点, 标记为2和6; +一个父节点,标记为2,作为根节点, 在顶部,没有父节点。 + +![Tree](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_tree.svg) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Tree_(data_structure)) +- [YouTube](https://www.youtube.com/watch?v=oSWTXtMglKE&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=8) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/trie/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/trie/README.md" new file mode 100644 index 00000000..bad277d4 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/2_\345\237\272\347\241\200\347\237\245\350\257\206/trie/README.md" @@ -0,0 +1,16 @@ +# 字典树 + +在计算机科学中, **字典树(trie,中文又被称为”单词查找树“或 ”键树“)**, 也称为数字树,有时候也被称为基数树或前缀树(因为它们可以通过前缀搜索),它是一种搜索树--一种已排序的数据结构,通常用于存储动态集或键为字符串的关联数组。 + +与二叉搜索树不同, 树上没有节点存储与该节点关联的键; 相反,节点在树上的位置定义了与之关联的键。一个节点的全部后代节点都有一个与该节点关联的通用的字符串前缀, 与根节点关联的是空字符串。 + +值对于字典树中关联的节点来说,不是必需的,相反,值往往和相关的叶子相关,以及与一些键相关的内部节点相关。 + +有关字典树的空间优化示意,请参阅紧凑前缀树 + +![Trie](https://upload.wikimedia.org/wikipedia/commons/b/be/Trie_example.svg) + +## 参考 + +- [Wikipedia](https://en.wikipedia.org/wiki/Trie) +- [YouTube](https://www.youtube.com/watch?v=zIjfhVPRZCg&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=7&t=0s) diff --git "a/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/README.md" "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/README.md" new file mode 100644 index 00000000..5c29ccd8 --- /dev/null +++ "b/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200/README.md" @@ -0,0 +1,25 @@ +## PART_1_算法基础 + +[下载 XMIND + PDF 完整版](https://www.cxyhub.com/all/programming/12460/) + +- ①:数据结构知识框架:为了大家更好的掌握数据结构和算法,我把基础知识整理成了一张思维导图,包括下面这些内容 + +[开始学习](./1_数据结构知识框架/README.md) + + + + +

+ +- ②:基础知识 + +* [链表](./2_基础知识/linked-list/README.md) +* [双向链表](./2_基础知识/doubly-linked-list/README.md) +* [队列](./2_基础知识/queue/README.md) +* [栈](./2_基础知识/stack/README.md) +* [哈希表(散列)](./2_基础知识/hash-table/README.md) +* [堆](./2_基础知识/heap/README.md) +* [优先队列](./2_基础知识/priority-queue/README.md) +* [字典树](./2_基础知识/trie/README.md) +* [树](./2_基础知识/tree/README.md) +* [图](./2_基础知识/graph/README.md) diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/README.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/README.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/README.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/README.md" index d35fdfd6..55ce221e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/README.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/README.md" @@ -1,15 +1,4 @@ -> ### **小浩算法是一套针对小白的完整的算法训练流程!** -> -> css -> Statr -> Statr -> -> 目前共包括以下几个步骤: -> - 算法基础知识 -> - 算法图解题典 -> - 算法视野扩展 - -## PART II 算法图解题典 +## PART_2_力扣图解 | Title | 分类 | 难度 | |---|---|---| diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/01.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/01.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/01.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/01.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/02.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/02.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/02.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/02.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/03.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/03.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/03.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/1.\345\255\246\344\271\240\351\241\273\347\237\245/03.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701.md" similarity index 90% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701.md" index 6dceefda..a3b5be88 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701.md" @@ -9,17 +9,17 @@ date: 2020-06-14 在leetcode中,直接搜索**排序标签**出现的题目有80余道,这是与排序直接相关的题目,不包括其他一些用到排序思想的题目。 -PNG +PNG 同时,各个公司在面试的过程中,或多或少都直接或间接问到过排序相关的内容(毕竟面试官不知道问什么时,都会用排序算法来救救场。不要问我是怎么知道的...),尤其是 **快排、堆排序、全排列** 等 Topic,在面试中屡试不爽。
百度:堆排序
-PNG +PNG
滴滴:全排列
-PNG +PNG 综上,得出结论**:为了offer~排序很重要,我们需要进行掌握。** @@ -31,7 +31,7 @@ date: 2020-06-14 插入排序:就是炸金花的时候,你**接一个同花顺**的过程。(标准定义:在要排序的一组数中,假定前n-1个数已经排好序,现在将第n个数插到前面的有序数列中,使得这n个数也是排好顺序的) -PNG +PNG 代码示例: @@ -54,7 +54,7 @@ func insert_sort(arr []int) {     输入: -PNG +PNG 讲解完了插入排序,我们根据其思想,完成下面这道题目吧 @@ -87,7 +87,7 @@ func insert_sort(arr []int) {     假设我们的数组为:[3,1,2,4] -PNG +PNG 根据以上分析,得到代码: @@ -106,5 +106,5 @@ func sortArrayByParity(A []int) []int { 执行结果: -PNG +PNG diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/4.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/4.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/4.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/4.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/10.\346\216\222\345\272\217\347\261\273\351\242\230\347\233\256/701/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801.md" index 91103d76..0ada1f88 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801.md" @@ -58,11 +58,11 @@ class Solution { 利用这一特性,我们**将递归的返回条件取非然后作为 && 的第一个条件,递归主体转换为第二个条件语句**。我知道肯定有人又会懵圈了,所以我们绘图说明。假若这里n=3,大概就是下面这样: -PNG +PNG 这里还有一点要强调的就是,受制于各语言的语法规则,我们需要做一些额外的处理。比如Java,这里如果去掉前面的变量申明,就会直接报错。 -PNG +PNG 但是如果是C 就没有这样的问题: @@ -121,4 +121,4 @@ func sumNums(n int) int { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/801/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802.md" index 66333450..044f526e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802.md" @@ -50,15 +50,15 @@ date: 2020-06-21 先观察一些是2的幂的二进制数: -PNG +PNG **可以发现这些数,都是最高位为1,其他位为0**。所以我们把问题转化为“判断一个数的二进制,除了最高位为1,是否还有别的1存在”。然后我们再观察下面这样的一组数,对应着上面的数减去1: -PNG +PNG 我们对两组数求“&”运算: -PNG +PNG 可以看到,对于N为2的幂的数,**都有 N&(N-1)=0 ,** 所以这就是我们的判断条件。(这个技巧可以记忆下来,在一些别的位运算的题目中也是会用到的) @@ -75,7 +75,7 @@ func isPowerOfTwo(n int) bool { 执行结果: -PNG +PNG ## 03、证明过程 @@ -85,7 +85,7 @@ func isPowerOfTwo(n int) bool { “阳春白雪,下里巴人”这个比喻虽然有点牵强,但是却难掩位运算的重要性。位运算在整个算法体系里,不少人可能会觉得有点食之无味、弃之可惜的意思。但其实,完全不是这样!有这种想法的,大多是初学者。对于这点,应该C系的玩家,会深有感触。万丈高楼平地起,暂且不说位运算在底层运算中占据了多大比重,单是整个leetcode列表里,打着位运算标签的题目就超过80余道,我想已经说明了问题。**至少,在面试这块,你必须对位运算了如指掌!** 所以,今天的题目算是一个引子,后面我会出一个位运算的专题,希望尽我所能,帮助大家攻克这一类型的问题。 -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/802/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803.md" index 668e582d..54a842b2 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803.md" @@ -60,15 +60,15 @@ date: 2020-06-21 那如何计算当前是第几位呢,我们可以构造一个掩码来进行,说掩码可能大家听着有点懵逼,其实就是弄个1出来,1的二进制是这样: -PNG +PNG 我们只需要让这个掩码每次向左移动一位,然后与目标值求“&”,就可以判断目标值的当前位是不是1。比如目标值为21,21的二进制是这样: -PNG +PNG 然后每次移动掩码,来和当前位进行计算: -PNG +PNG 根据分析,完成代码: @@ -92,7 +92,7 @@ public class Solution { 执行结果: -PNG +PNG 注意:这里判断 n&mask 的时候,千万不要错写成 (n&mask) == 1,因为这里你对比的是十进制数。(恰好这个题我之前面试别人的时候问到过,对方就直接这么写了...) @@ -104,7 +104,7 @@ public class Solution { 大家是否还记得昨天学会的技巧,昨天的题目我们通过计算 n & n-1 的值,来判断是否是 2 的幂。今天我们继续使用这个技巧,观察一下,**对于任意一个数,将 n 和 n-1 进行 & 运算,我们都可以把 n 中最低位的 1 变成 0**。比如下面这两对数: -PNG +PNG 那下面就简单了,只需要不断进行这个操作就可以了。(翻CPP牌子,有没有好评的?) @@ -126,7 +126,7 @@ public: 肯定有人又是看的一脸懵逼,我们拿 11 举个例子:(注意最后一位1变成0的过程) -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/803/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804.md" similarity index 97% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804.md" index 04df0d8c..b974ded7 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804.md" @@ -65,7 +65,7 @@ date: 2020-06-23 可能有人直接都不知道异或是什么,所以还是举个例子,比如5异或3,也就是5⊕3,也就是5^3,是下面这样: -PNG +PNG 根据分析,得出代码:(c 版本) @@ -112,7 +112,7 @@ class Solution: 执行结果: -PNG +PNG ## 03、题目进阶 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/804/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805.md" index 65a3ef86..589c3edd 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805.md" @@ -73,7 +73,7 @@ func singleNumber(nums []int) int { 执行结果: -PNG +PNG ## 03、数学方式 @@ -87,7 +87,7 @@ func singleNumber(nums []int) int { 也就是说,如果把**原数组去重、再乘以3得到的值,刚好就是要找的元素的2倍**。举个例子: -PNG +PNG 利用这个性质,进行求解:(python代码如下,这里要注意的是,使用int可能会因为超出界限报错) @@ -99,7 +99,7 @@ class Solution: 执行结果: -PNG +PNG ## 04、位运算 @@ -113,15 +113,15 @@ class Solution: 假如我们有 [21,21,26] 三个数,是下面这样: -PNG +PNG 回想一下,之所以能用“**异或**”,其实我们是完成了一个 **同一位上有2个1清零** 的过程。上面的图看起来可能容易,如果是这样 (下图应为26^21): -PNG +PNG 那对于“每个其余元素,均出现了三次”也是一样,如果我们可以完成 **一个同一位上的三个1清零的过程,** 也就是 a ?a ?a = 0,问题则迎刃冰解。那因为各语言中都没有这样一个现成的方法可以使用,所以我们需要构造一个。(想象一下,位运算也是造出来的对不对?) -PNG +PNG 如何构造,这里先说第一种方法(注意,到这里我们的问题已经转化成了定义一种 a ? a ? a = 0 的运算),观察一下“异或”运算: @@ -130,7 +130,7 @@ class Solution:
0^1=1
是不是可以理解为,其实就是二进制的加法,然后砍掉进位呢? -PNG +PNG **砍掉进位的过程,是不是又可以理解为对 2 进行取模**,也就是取余。到了这里,问题已经非常非常明确了。那我们要完成一个 a ? a ? a = 0 的运算,是不是其实就是让其二进制的每一位数都相加,最后再对 3 进行一个取模的过程呢?(一样,如果要定义一个 a ? a ? a ? a = 0 的运算,那就最后对 4 进行取模就可以了) @@ -154,19 +154,19 @@ func singleNumber(nums []int) int { 如果对上面的代码不能理解,可以看看这个图,假设只有一个数 [21],我们通过不断右移的方式,获取其每一位上的1。当然,这里因为余数都是1,所以肯定都保留了下来,然后与 1 进行 “与”运算,最终再将其放入到对应的位数上。 -PNG +PNG 执行结果: -PNG +PNG 在上面的代码中,**我们通过一个number,来记录每一位数出现的次数**。但是缺点是,我们记录了64位(Go语言中,int为32位以上) -PNG +PNG 那如果我们可以同时对所有位进行计数,是不是就可以简化过程。因为我们的目的是把每一位与3取模进行运算,是不是就可以理解为其实是一个**三进制**。如果大家听不懂三进制的话,可以简单理解为3次一循环,也就是 00 - 01 - 10 - 11。但是又因为对于 11 这种情况,我们需要砍掉(上面已经说过了,相当于 11 - 00 的转化),所以我们就只有3个状态,00 - 01 - 10,所以我们采用 a 和 b 来记录状态。其中的状态转移过程如下: -PNG +PNG 这里 a‘ 和 b’ 的意思代表着 a 和 b 下一次的状态。next 代表着下一个 bit 位对应的值。然后这是什么,不就是状态机嘛。。。我们通过 a 和 b 的状态变化,来完成次数统计。 @@ -220,7 +220,7 @@ class Solution { 当然,这个解法就相当牛皮了,反正我第一次做肯定是想不到的。。。我看了一下,第一个给出这个解法的人,应该是一位国外的工程师(某扣上面有很多人其实都是把题解翻译过来的,当然我有时也会哈哈哈哈,我觉得这某种意义上讲也是一个好的现象,挺好)不过毕竟非原创,还是得说明一下! -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/805/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806.md" index 8adc7693..768526ae 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806.md" @@ -51,13 +51,13 @@ date: 2020-06-24 > 说高斯公式,估计大家听着懵逼,其实就是那个 1 2 3 ... n = (1 n) * n / 2,即: > -> PNG +> PNG
首先求出数组的和,然后再利用公式求出前n 1项之和,最终求差值,即为缺失的值!比如下面长度为4的数组,缺失4。 -PNG +PNG - 2 + 3 + 1 + 5 = 11 - (1 5) * 5 / 2=15 @@ -87,7 +87,7 @@ class Solution { 执行结果: -PNG +PNG ## 03、位运算求解 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/11.\344\275\215\350\277\220\347\256\227\347\263\273\345\210\227/806/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901.md" similarity index 97% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901.md" index c5fbec57..f4f382d0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901.md" @@ -72,15 +72,15 @@ date: 2020-06-30 在最简单的形式中,二分查找对具有指定左索引和右索引的**连续序列**进行操作。我们也称之为**查找空间**。二分查找维护查找空间的左、右和中间指示符,并比较查找目标;如果条件不满足或值不相等,则清除目标不可能存在的那一半,并在剩下的一半上继续查找,直到成功为止。 -PNG +PNG 举例说明:比如你需要找1-100中的一个数字,你的目标是**用最少的次数**猜到这个数字。你每次猜测后,我会说大了或者小了。而你只需要每次猜测中间的数字,就可以将余下的数字排除一半。 -PNG +PNG 不管我心里想的数字如何,你在7次之内都能猜到,这就是一个典型的二分查找。每次筛选掉一半数据,所以我们也称之为 **折半查找**。一般而言,对于包含n个元素的列表,用二分查找最多需要log2n步。 -PNG +PNG 当然,一般题目不太可能给你一个如此现成的题型,让你上手就可以使用二分,所以我们需要思考,如何来构造一个成功的二分查找。大部分的二分查找,基本都由以下三步组成: @@ -224,7 +224,7 @@ public class Solution { 执行结果: -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/901/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902.md" similarity index 99% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902.md" index 766bca4a..a919e63e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902.md" @@ -35,7 +35,7 @@ Left 设置为 1 比较容易理解,因为我们可以直接处理掉 x 为 0 我们看一下下面这些数的值: -PNG +PNG 很容易观察出,当 x>2 时,它的**整数平方根**一定小于等于 x/2 。即有 0 < 整数平方根 <= x/2。所以我们的问题转化为在 [0,x/2] 中找一个**特定值**,满足二分查找的条件。(当然,如果没有想到使用 x/2 作为 Right 而 直接使用 x ,其实也是可以的) diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/902/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903.md" similarity index 97% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903.md" index 02dfce14..e0e3a046 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903.md" @@ -51,11 +51,11 @@ public int firstBadVersion(int n) { 我们自然是采用二分的思想,来进行查找。举个例子,比如我们版本号对应如下: -PNG +PNG 如果中间的mid如果是错误版本,那我们就知道 mid 右侧都不可能是第一个错误的版本。那我们就令 right = mid,把下一次搜索空间变成[left, mid],然后自然我们很顺利查找到目标。 -PNG +PNG 根据分析,代码如下: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/903/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904.md" index 115bbaf8..b2442064 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904.md" @@ -37,27 +37,27 @@ date: 2020-07-03 当然,本题可以直接暴力搜索,但是这就就会被面试官撵出去。为了不被他撵出去,我们还是使用二分更为稳妥!**在二分搜索中,我们找到区间的中间点并根据某些条件决定去区间左半部分还是右半部分搜索**。但是麻烦的是,我们的数组被旋转了,因此肯定不能直接使用二分。那我们需要先观察一下,假若我们的原始数组如下: -PNG +PNG 无论怎么旋转,我们都可以得到一个结论,首元素 > 尾元素,像是下面这样。虽然不知道这个结论有什么用,但是我们先记下来。 -PNG +PNG 继续进行观察,上面其实是两种极端情况,那如果普通的情况旋转,大概是下面这样: -PNG +PNG 问题似乎变得简单了,旋转将原数组一分为二,并且我们已知了首元素值总是大于尾元素,那我们只要找到将其一分为二的那个点(该点左侧的元素都大于首元素,该点右侧的元素都小于首元素),是不是就可以对应找到数组中的最小值。 -PNG +PNG 然后我们通过二分来进行查找,先找到中间节点mid,如果中间元素大于首元素,我们就把mid向右移动。 -PNG +PNG 如果中间元素小于首元素,我们就把mid向左移动。 -PNG +PNG 根据分析,完成题解: @@ -120,7 +120,7 @@ int findMin(int* nums, int numsSize){ 执行结果: -PNG +PNG ## 03、课后思考 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/904/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905.md" index 2c9869fd..90b1c00a 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905.md" @@ -38,9 +38,9 @@ date: 2020-07-03 > 之前我也说过,通过改变题中条件,使得题目难度上升的做法。在算法题目的设计中,是一种非常常见的手段。本题就是这样,从中等变成了困难。 -PNG +PNG -PNG +PNG 在讲解本题之前,首先要对昨天的题目进行一个答疑。昨天有人问我为什么题目中讲的是与left进行比较,但是最后代码中写的时候变成了和right比较。这个确实是我讲的时候讲忘了,但是这其实是一个思维转化的问题:因为在旋转之前的原数组是一个递增序列,那一定是左边的数小,右边的数大,而我们要找的是最小值,所以比较偏向左找。那如果和left进行比较,其实也是完全ok的,那我们的思路就变成了找到偏右的最大值,进而向右再移动一位,自然也就是最小值。如果不能理解的话,可以回顾一下昨天的文章: @@ -80,10 +80,10 @@ func findMin(nums []int) int { 对比一下下面两个图: -PNG +PNG
(无重复)
-PNG +PNG
(有重复)
其实直接就可以给出代码了: @@ -112,12 +112,12 @@ class Solution { 如果我们再对比一下代码的差异,就会非常的明显: -PNG +PNG
(左边是有重复,右边是无重复)
可以看到在 nums[mid] 等于 nums[right] 时的情况下,我们只多了一个 right-1 的操作。这里需要额外说明的是,为什么要这样做?我看leetcode上的题解,这块很多都是长篇大论,其实没那么复杂,一句话就可以给你讲明白,看看下面这个! -PNG +PNG 因为 mid 和 right 相等时,最小值既可能在左边,又可能在右边,所以此时自然二分思想作废,咱们就砍掉一个右边界。说白了,就是**让子弹再飞一会儿**。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/905/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906.md" index fa42623c..84def6c5 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906.md" @@ -5,7 +5,7 @@ date: 2020-07-06 > 当然不能让你真的去修供暖器,但是如果你真的很有兴趣,可以参考下面步骤: -PNG +PNG 今天为大家分享一道腾讯校招面试题,话不多说,一起来看题吧。 @@ -53,7 +53,7 @@ date: 2020-07-06 这个题目还是比较有趣的,解题的关键在于读懂题意:我们要对任意一个房屋供暖,要么用前面的暖气,要么用后面的暖气,两者之间取最近的,这就是距离。同时,如果要覆盖到所有的房屋,我们要选择上述距离中最大的一段,这就是最小的加热半径。 -PNG +PNG 当然,我们可以采用暴力题解,通过双层遍历,第一层:遍历所有的房子,第二层:遍历加热器,找出距离该房子的最小距离。但是我们其实可以通过二分搜索来优化这个过程。 @@ -95,7 +95,7 @@ public: 最后还有一点要强调的就是:代码在刚开始的时候进行了一次排序。这个也是容易进入的误区,题目给的样例给人一种错觉 “提供的就是有序数组”,其实题中并没有说明,我第一次就犯了这样的错误。如果去掉排序的代码,就会报错: -PNG +PNG ## 03、其他 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/12.\344\272\214\345\210\206\346\263\225\347\263\273\345\210\227/906/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1.md" index dd624a25..59dd190a 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1.md" @@ -13,7 +13,7 @@ date: 2020-07-11 比如 [1,2,3] 全排列共有 6 种: -PNG +PNG ## 02、全排列题目 @@ -47,7 +47,7 @@ date: 2020-07-11 假如我们不是做算法题,而是做数学题。我们会一个位置一个位置的来考虑,先写出以1开头的排列,再写出以2开头的排列,最后写出以3开头的排列。 -PNG +PNG 这种思路是不是很像深度优先(DFS)的求解过程呢? @@ -55,19 +55,19 @@ date: 2020-07-11 1、我们先选择 1,然后为 1 的第二位选择 2,此时 1 的 第三位只能选择 3。 -PNG +PNG 2、然后完成了上面的步骤,我们需要回退到 1,因为只有 1 这里还存在别的选择 1-3,然后填写 1-3 后,只有 1-3-2 一种选择。 -PNG +PNG 3、此时我们需要从 1-3-2,回退到 1-3,再回退到 1,再回退到 根节点,然后重新选择 2。 -PNG +PNG 4、后面的流程与前面相似,我就不一步步的描述了。 -PNG +PNG 当然,如果不省略其回溯过程,就是下面这个样子: @@ -109,7 +109,7 @@ class Solution { 假若 nums 为 [1,2,3],会有下面的输出: -PNG +PNG 其实这个代码还是很容易理解的,他干了个啥事?就是当我们按顺序去枚举每一位时,我们要把已经选择过的数字排除掉(第16行代码),比如我们上面选择三个数字: @@ -135,7 +135,7 @@ class Solution { 这是最简单的一道全排列题目,注意我在上面的题解中,并没有引入什么状态、路径、选择列表、结束条件之类的专业术语,甚至我连回溯的概念都没有提及。 -PNG +PNG 之所以这样讲,我是希望咱可以从最简单的人类思考出发,而不是去套用一些框架之类的东东。。。。当然,至于更多的概念和回溯框架的东西,我会在后面更为复杂的题目中为大家引入。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.mp4" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.mp4" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.mp4" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/1.mp4" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/8.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/8.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/8.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/13.\345\233\236\346\272\257\347\263\273\345\210\227/1/8.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01.md" similarity index 88% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01.md" index 7efe5b0c..901c96f1 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01.md" @@ -65,7 +65,7 @@ date: 2020-06-15 数组如下图所示: -PNG +PNG 我们首先对其设置好四个边界: @@ -78,29 +78,29 @@ right := len(matrix[0]) - 1 如下图所示: -PNG +PNG 同时,我们定义x和y,来代表行和列。 如x=2,y=1,则 arr[2][1]=10(第3行第2列) -PNG +PNG 然后我们从第一个元素开始行军(y=left),完成第一行的遍历,直到碰壁。(y<=right) -PNG +PNG 下面关键的一步来了,**因为第一行已经走过了,我们将上界下调** **(up++)**,同时转弯向下走。 -PNG +PNG 直到碰到底部时(x<=down),我们将**右界左调(right--)**,转弯向左走。 -PNG +PNG 后面向左和向上,分别完成**下界上调(down--)**和**左界右调(left++)**。 -PNG +PNG 最后,对剩下的矩阵重复整个过程,直到上下、左右的壁与壁碰在一起 **(up <= down && left <= right,这是避免碰壁的条件)**。 @@ -149,4 +149,4 @@ func avoid(left, right, up, down int) bool { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/4.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/4.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/4.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/4.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/8.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/8.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/8.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/01/8.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02.md" similarity index 89% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02.md" index 79cee886..abe27b70 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02.md" @@ -41,23 +41,23 @@ n 的取值范围是 [1, 1000] 。 我们从最简单的开始分析,假如我们给定数字为1,那啥也不用做,因为面板上本来就有一个A。 -PNG +PNG 假如我们给定数字为2,那我们需要做C-P,共计2次操作来得到。 -PNG +PNG 假如我们给定数字为3,那我们需要做C-P-P,共计3次操作来得到。 -PNG +PNG 假如我们给定数字为4,我们发现好像变得不一样了。因为我们有两种方法都可以得到目标。(C-P-C-P) -PNG +PNG 或者(C-P-P-P) -PNG +PNG 但是需要的步骤还是一样。 @@ -73,7 +73,7 @@ n 的取值范围是 [1, 1000] 。 比如30,可以分解为:3*2*5。什么意思呢?我们演示一遍:首先复制1,进行2次粘贴得到3。然后复制3,进行1次粘贴得到6。然后复制6,进行4次粘贴得到30。总共需要(CPPCPCPPPP) -PNG +PNG > 注意:这里由于每一次都需要进行一次复制,**所以直接就等于分解质因数的操作次数的和**。并且分解的顺序,不会影响到结果。 @@ -106,4 +106,4 @@ func minSteps(n int) int { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/02/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03.md" similarity index 99% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03.md" index 491474cb..499f882e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03.md" @@ -258,7 +258,7 @@ func judgePoint24_2(a, b float64) bool { 执行结果: -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/03/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04.md" index edfd6421..905b6360 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04.md" @@ -42,25 +42,25 @@ date: 2020-06-15 一个位置一个人,一屁股蹲下,概率100%,这没啥可说的。 -PNG +PNG 两个位置两个人,第一个人已经坐下,要么坐对了,要么坐错了。所以第二个人坐在自己位置上的概率是50%。 -PNG +PNG 重点来了,三个位置三个人,第一个一屁股坐下,有三种坐法。PNG 如果恰好**第一个人坐到了自己的座位**上(1/3),那这种情况下,第二个人也就可以直接坐在自己的座位上,第三个人一样。所以此时第三人坐在自己座位上的可能性是 100%。 -PNG +PNG 如果**第一个人占掉了第二个人的位置(1/3)。** 此时第二人上来之后,要么坐在第一人的位置上,要么坐在第三人的位置上。(1/2)所以,在这种情况下,第三人的座位被占的可能性是 1/3*1/2=1/6。 -PNG +PNG 那假如第一人直接一屁股坐在第三人的座位上,此时第三人的座位被占的可能性就是第一人选择第三人座位的可能性。(1/3) -PNG +PNG 所以,如果三个座位三个人,第三个人坐到自己位置上的概率就是:1-1/6-1/3=1/2。当然,也可以通过 1/3+1/6=1/2 来正向计算。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/3.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/3.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/3.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/3.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/6.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/6.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/6.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/04/6.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/05.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/05.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/05.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/05.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/06.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/06.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/06.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/06.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07.md" index dea9f95e..faa24955 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07.md" @@ -25,15 +25,15 @@ date: 2020-06-16 - 5次:首先我们把25匹马分成5组(A、B、C、D、E),跑上五次,得到每组的第一名。 - PNG + PNG - 1次:然后我们让这5个第一名跑上一次,得到其中的前三名。**注意:这里就可以得到所有马中跑的最快的第一名A1了。并且,D1和E1所在的组可以直接淘汰。第二名和第三名一定不会在其中产生!** - PNG + PNG - 1次:因为我们已经跑出了第一名,所以A1不需要再参加比赛,同时,D1和E1所在的组已经淘汰。C1作为第三组的第一名,C组不会有跑的比C1快的。而B2有可能是比C1跑的快的第三名。同理,A2和A3也有可能是比B1和B2跑的快的。所以第7次比赛,我们让**A2,A3,B1,B2,C1**来一起完成。(求大家不要怪我啰嗦,,,我是实在担心有那么几个同学听不懂...) - PNG + PNG 最终,我们**通过7次比赛**,得到25匹马中的前三名。 @@ -45,7 +45,7 @@ date: 2020-06-16 在上面的的分析中,我们已经明确了第一名。**但是第二名和第三名,是可以在A2-A3-B1-B2-C1中产生的**,我们需要分别进行讨论。 -PNG +PNG - 假若二三名分别为:A2,A3 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/07/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08.md" index 68db9504..bbb755eb 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08.md" @@ -35,19 +35,19 @@ date: 2020-06-17 我们模拟一下n从1到12的过程。在第一轮,你打开了12个灯泡: -PNG +PNG 因为对于大于n的灯泡你是不care的,所以我们用黑框框表示: -PNG +PNG 然后我们列出n从1-12的过程中所有的灯泡示意图: -PNG +PNG 可以得到如下表格: -PNG +PNG 观察一下,这是什么?观察不出来,咱们看看这个: @@ -90,7 +90,7 @@ public: 执行结果: -PNG +PNG ## 03、证明 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/08/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09.md" index da438bd1..4e20337c 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09.md" @@ -35,11 +35,11 @@ date: 2020-06-17 我们用一个很通俗的方法,能让你一听就懂。首先刚开始选择的一扇门的概率为1/3,而另外两扇门的总概率为2/3。 -PNG +PNG 现在上帝打开了其中一扇为恶魔的门,我们知道这个门后面不会再有天使,所以相当于这部分概率被第三个门持有。 -PNG +PNG 剩下的那扇门的概率(2/3)相当于刚开始选择的门(1/3)的二倍。所以我们得换。 @@ -47,7 +47,7 @@ date: 2020-06-17 如果还没有听懂。我们可以假设有一百扇门,里边有99只都是恶魔。现在你随机选择一扇门,选择到天使的概率是1/100。 -PNG +PNG 这时,上帝打开其中的98扇,里边都是恶魔。这时候就相当于99/100的概率都集中在了另一扇门里。自然,我们需要选择换。PNG @@ -82,6 +82,6 @@ func main() { 跑了一百万次,结果当然不让我们失望!执行结果为: -PNG +PNG 所以,今天的问题你听明白了吗?评论区留下你的想法吧! \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/3.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/3.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/3.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/3.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/4.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/4.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/4.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/4.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/09/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10.md" index 8bd867c3..e1d5d2d1 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10.md" @@ -47,11 +47,11 @@ date: 2020-06-17 - 如果当前索引两个数字相同,就将公牛数加1。 - PNG + PNG - **如果不相同,我们将secret和guess当前索引位置处的数字通过map记录下来,统计他们出现的次数。**当然,之前我们讲过。有限的map,比如数字 0-10,字母 a-z,都可以通过**数组**来进行替换,用以压缩空间。 - PNG + PNG - 最后,如果记录的两个map中,**数字出现重叠**(可以通过最小值来判断),则意味着该数字在两边都出现过,就将母牛数加一(我就想说是母牛,不服来辩) @@ -91,7 +91,7 @@ func min(a, b int) int { 执行结果: -PNG +PNG ## 04、奇怪的知识 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/10/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11.md" index d822509e..870902d4 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11.md" @@ -51,31 +51,31 @@ cache.get(4); // 返回 4 第一步:我们申明一个 LRUCache ,长度为 2。 -PNG +PNG 第二步:我们分别向 cache 里边 put(1,1) 和 put(2,2),这里因为最近使用的是 2( put 也算作使用)所以2在前,1 在后。 -PNG +PNG 第三步:我们 get(1),也就是我们使用了 1,所以需要将 1 移到前面。 -PNG +PNG 第四步:此时我们 put(3,3),因为 2 是最近最少使用的,所以我们需要将 2 进行作废。此时我们再 get(2),就会返回 -1 。 -PNG +PNG 第五步:我们继续 put(4,4),同理我们将 1 作废。此时如果 get(1) ,也是返回 -1 。 -PNG +PNG 第六步:此时我们 get(3) ,实际为调整 3 的位置。 -PNG +PNG 第七步:同理,get(4),继续调整 4 的位置。 -PNG +PNG ## 03、LRU 实现(层层剖析) @@ -124,7 +124,7 @@ func Constructor(capacity int) LRUCache { 大概是这样: -PNG +PNG 现在我们已经完成了 Cache 的构造,剩下的就是添加它的 API 了。因为 Get 比较简单,我们先完成 Get 方法。这里分两种情况考虑,如果没有找到元素,我们返回 -1。如果元素存在,我们需要把这个元素移动到首位置上去。 @@ -147,7 +147,7 @@ func (this *LRUCache) Get(key int) int { 大概就是下面这个样子(假若 2 是我们 get 的元素) -PNG +PNG 我们很容易想到这个方法后面还会用到,所以将其抽出。 @@ -248,7 +248,7 @@ func (this *LRUCache) Put(key int, value int) { } ``` -PNG +PNG 最后,我们完成所有代码: @@ -389,7 +389,7 @@ func (this *LRUCache) Put(key int, value int) { 执行结果: -PNG +PNG 因为该算法过于重要,给一个 Java 版本的: @@ -487,7 +487,7 @@ public class LRUCache { 上面我们说过了,**近似LRU是用随机抽样的方式来实现一个近似的LRU效果**。这个参数其实就是作者提供了一种方式,可以让我们人为干预样本数大小,将其设的越大,就越接近真实 LRU 的效果,当然也就意味着越耗内存。(初始值为 5 是作者默认的最佳) -PNG +PNG 这个图解释一下,绿色的点是新增加的元素,深灰色的点是没有被删除的元素,浅灰色的是被删除的元素。最下面的这张图,是真实 LRU 的效果,第二张图是默认该参数为 5 的效果,可以看到浅灰色部分和真实的契合还是不错的。第一张图是将该参数设置为 10 的效果,已经基本接近真实 LRU 的效果了。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/10.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/10.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/10.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/10.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/11.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/11.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/11.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/11.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/12.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/12.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/12.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/12.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/6.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/6.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/6.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/6.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/7.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/7.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/7.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/7.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/8.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/8.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/8.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/8.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/9.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/9.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/9.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/11/9.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12.md" similarity index 90% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12.md" index e0ede9f2..c6212069 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12.md" @@ -42,11 +42,11 @@ date: 2020-06-18 堆的特性是**父节点的值总是比其两个子节点的值大或小**。如果父节点比它的两个子节点的值都要大,我们叫做**大顶堆**。如果父节点比它的两个子节点的值都要小,我们叫做**小顶堆**。 -PNG +PNG 我们对堆中的结点按层进行编号,将这种逻辑结构映射到数组中就是下面这个样子。 -PNG +PNG 大顶堆,满足以下公式: @@ -54,7 +54,7 @@ date: 2020-06-18 小顶堆也一样: -PNG +PNG 小顶堆,满足以下公式: @@ -66,7 +66,7 @@ date: 2020-06-18 首先,我们创建一个大小为k的大顶堆。假如数组为[4,5,1,6,2,7,3,8],k=4。大概是下面这样: -PNG +PNG 我想肯定这里有不知道如何建堆的同学。记住:**对于一个没有维护过的堆(完全二叉树),我们可以从其最后一个节点的父节点开始进行调整**。这个不需要死记硬背,其实就是一个层层调节的过程。 @@ -74,15 +74,15 @@ date: 2020-06-18 从最后一个节点的父节点调整 -PNG +PNG 继续向上调整 -PNG +PNG 继续向上调整 -PNG +PNG 建堆 调整的代码大概就是这样:(翻Java牌子) @@ -131,11 +131,11 @@ private void swap(int[] nums, int i, int j) { 调整前 -PNG +PNG 调整后 -PNG +PNG 继续重复上述步骤,依次将7,3,8入堆。这里因为7和8都大于堆顶元素5,所以只有3会入堆。 @@ -143,11 +143,11 @@ private void swap(int[] nums, int i, int j) { 调整前 -PNG +PNG 调整后 -PNG +PNG 最后得到的堆,就是我们想要的结果。由于堆的大小是 K,所以这里空间复杂度是O(K),时间复杂度是O(NlogK)。 @@ -207,4 +207,4 @@ class Solution { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/9.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/9.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/9.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/12/9.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13.md" similarity index 90% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13.md" index fb5bef09..bb5c3da5 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13.md" @@ -13,7 +13,7 @@ date: 2020-06-18 | ------------------------------------------------------------ | | 一个机器人位于一个 m x n 网格的左上角,起始点在下图中标记为“Start”。机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角,在下图中标记为“Finish”。 问:总共有多少条不同的路径? | -PNG +PNG 例如,上图是一个7 x 3 的网格。有多少可能的路径? @@ -49,11 +49,11 @@ date: 2020-06-18 拿到题目,首先定义状态。因为有横纵坐标,明显属于二维DP。我们定义**DP[i][j]表示到达i行j列的最多路径**。同时,因为第0行和第0列都只有一条路径,所以需要初始化为1。 -PNG +PNG 状态转移方程一目了然,dp[i][j] = dp[i-1][j] dp[i][j-1]。(想象你站在一个十字路口,到达这个十字路口可能的所有路径,就是从东南西北四个方向过来可能出现的所有路径和。放在这道题里,其实就是砍掉东南。) -PNG +PNG 根据分析,完成代码: @@ -81,7 +81,7 @@ func uniquePaths(m int, n int) int { 执行结果: -PNG +PNG ## 03、代码优化 @@ -89,11 +89,11 @@ func uniquePaths(m int, n int) int { 在上文中,我们使用**二维数组**记录状态。但是这里观察一下,每一个格子可能的路径,**都是由左边的格子和上面的格子的总路径计算而来, 对于之前更早的数据,其实已经用不到了**。如下图,计算第三行时,已经用不到第一行的数据了。 -PNG +PNG 那我们只要能定义一个状态,同时可以表示左边的格子和上面的格子,是不是就可以解决问题?所以我们定义状态dp[j],用来表示**当前行到达第j列的最多路径**。这个“当前行”三个字很重要,比如我们要计算dp[3],因为还没有计算出,所以这时dp[3]保存的其实是4(上一行的数据),而dp[2]由于已经计算出了,所以保存的是6(当前行的数据)。理解了这个,就理解如何压缩状态。 -PNG +PNG 最后,根据分析得出代码: @@ -116,4 +116,4 @@ func uniquePaths(m int, n int) int { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/13/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14.md" index 7a3dd6bb..970ad8ec 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14.md" @@ -19,7 +19,7 @@ date: 2020-06-18 | ------------------------------------------------------------ | | 一个机器人位于一个 m x n 网格的左上角,起始点在下图中标记为“Start”。机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角,在下图中标记为“Finish”。现在考虑网格中有障碍物。那么从左上角到右下角将会有多少条不同的路径? 问总共有多少条不同的路径? | -PNG +PNG 网格中的障碍物和空位置分别用 1 和 0 来表示。 @@ -53,11 +53,11 @@ date: 2020-06-18 首先我们还是定义状态,**用DP[i][j]表示到达i行j列的最多路径**。同时,因为第0行和第0列都只有一条路径,所以需要初始化为1。但有一点不一样的就是:**如果在0行0列中遇到障碍物,后面的就都是0,意为此路不通**。 -PNG +PNG 完成了初始化,下面就是状态转移方程。和没有障碍物的相比没什么特别的,仍然是dp[i][j] = dp[i-1][j] dp[i][j-1]。唯一需要处理的是:**如果恰好[i][j]位置上有障碍物,则dp[i][j]为0**。比如下图,有dp[1][2]为0。 -PNG +PNG 根据分析,得出代码:(今天翻java牌子) @@ -89,7 +89,7 @@ class Solution { 执行结果: -PNG +PNG ## 03、代码优化 @@ -97,11 +97,11 @@ class Solution { 为了大家更好的理解代码,我们还是绘图说明。假若我们的网格如下,其中黑色表示障碍物。 -PNG +PNG 因为计算每一个格子能到达的最多路径,只需要左边和上边的元素,所以我们定义状态**dp[j]表示到达当前行第j位置的最多路径**。这里有一个需要额外说的,就是我们把dp[0]初始化为1,因为在到达第一行的第一个元素时,路径只有一个。下面的图,左边的表示当前网格,右边的是指网格中对应dp数组的值。 -PNG +PNG 根据分析,得出代码: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/14/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/15/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16.md" similarity index 80% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16.md" index 35d7a157..b3b68755 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16.md" @@ -16,7 +16,7 @@ date: 2020-06-19 说明:你不能倾斜容器,且 n 的值至少为 2。 -PNG +PNG 图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下,容器能够容纳水(表示为蓝色部分)的最大值为 49。 @@ -39,35 +39,35 @@ date: 2020-06-19 假若我们的数组为:[1 8 6 2 5 4 8 3 7],长这样: -PNG +PNG 首先,我们初始化两个指针,分别指向两边,构成我们的第一个矩形区域。 -PNG +PNG 我们尝试将长的一侧向短的一侧移动,发现对于区域面积增加没有任何意义。比如下图: -PNG +PNG 所以我们选择将短的一侧向长的一侧移动。根据木桶原理,水的高度取决于短的一侧。 -PNG +PNG 继续重复这个过程,我们总是**选择将短的一侧向长的一侧移动**。并且在每一次的移动中,我们记录下来当前面积大小。(下面这些图,都是我拿PPT一张张做的....) -PNG +PNG -PNG +PNG -PNG +PNG -PNG +PNG -PNG +PNG 一直到两个棒子撞在一起。 -PNG +PNG 根据分析,得到代码:(翻Java牌子) @@ -90,11 +90,11 @@ class Solution { > 可能有的朋友想让我证明一下。其实我觉得,这就是个木桶原理。木桶原理:**一只水桶能装多少水取决于它最短的那块木板**。 -PNG +PNG 采用反证法进行证明: -PNG +PNG >
area = h(m) * w
@@ -104,7 +104,7 @@ area = h(n) * (w-1) 有 area < area -PNG +PNG 移动n到n,如果n比m长,则有: @@ -112,6 +112,6 @@ area = h(m) * (w-1) 有 area < area -PNG +PNG 所以,今天的问题你学会了吗?评论区留下你的想法! \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/12.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/12.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/12.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/12.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/13.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/13.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/13.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/13.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/14.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/14.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/14.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/14.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/15.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/15.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/15.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/15.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/16/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17.md" index 5831fa5a..3ff7b418 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17.md" @@ -40,15 +40,15 @@ date: 2020-06-19 顺子长这样: -PNG +PNG 因为此题本身属于简单到要屎系列,所以直接给题解。数组长度限制了是5,非常省事,意味着我们不需要一些额外的处理。拿到牌,第一个想法是啥?排序!我想打过牌的人,都会知道这点(想象那个插插插的过程)。**因为是5连,无论接没接到大小王,最小值和最大值之间,一定小于5**。 -PNG +PNG 排序后,我们通过累积每两张牌之间的差值,来计算最小值和最大值中间的总差值。 -PNG +PNG 拿到了王,就相当于拿到了通行证,直接跳过。 @@ -56,7 +56,7 @@ date: 2020-06-19 因为是排序的牌,如果接到对子,也就意味着不是五连,直接返回false。(怎么每次说到五连,我就想到“penta kill” ) -PNG +PNG 根据分析,得出代码:(翻个go的牌子吧) @@ -80,7 +80,7 @@ func isStraight(nums []int) bool { 执行结果: -PNG +PNG ## 03、不排序咋整 @@ -115,4 +115,4 @@ class Solution { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/17/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18.md" similarity index 98% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18.md" index 7989eb3c..6004573e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18.md" @@ -39,7 +39,7 @@ date: 2020-06-19 要对一个整数进行拆分,并且要使这些拆分完后的因子的乘积最大。我们可以先尝试拆分几个数值,测试一下。 -PNG +PNG 通过观察,首先肯定可以明确,**2 和 3 是没办法进行拆分的最小因子**。同时,我们好像能看出来: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/18/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19.md" index 57fef870..b0017825 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19.md" @@ -5,7 +5,7 @@ date: 2020-06-20 > 今天为大家分享一个**脑筋急转弯**类型的算法题。leetcode这个脑筋急转弯的tag打的我措手不及... -PNG +PNG ## 01、题目示例 @@ -50,17 +50,17 @@ a != b, b != c, c != a 比如:a = 1, b = 2, c = 5 -PNG +PNG 比如:a = 4, b = 3, c = 2 -PNG +PNG
(无法移动)
读懂了题意,开始进行分析。首先可以明确,每一次我们其实**是从边上来挑选石子,然后往中间进行移动**。所以,我们首先得找到min(左),max(右)以及mid(中)三个值。我们设,min和mid中的距离为x,max和min中的距离为y。大概就是下面这样: -PNG +PNG 然后只需要计算x和y的和,就是我们要找的最大值。而最小值,就很容易了,只有0,1,2三种可能性。 @@ -116,4 +116,4 @@ public: 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/19/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20.md" index 64c4d5d3..7018daeb 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20.md" @@ -5,7 +5,7 @@ date: 2020-06-20 > 上一篇是为大家分享了一道打着“脑筋急转弯”tag的题目,然后我顺便就把这个类型的题目全部筛选出来看了看,发现总共没几个,所以就想的干脆一次全部讲完吧。 -PNG +PNG ## 01、题目示例 @@ -38,15 +38,15 @@ PS:建议大家停留个两分钟先想一想...直接拉下去看题解就没 首先如果石头数小于4个,那么因为你是先手,一把拿走,肯定会赢。 -PNG +PNG 而如果石头是4个,那不管你是拿了1,2,3个,最后一个都可以被你的对手拿走,所以怎么样都赢不了。 -PNG +PNG 再继续分析到8个石头:对于5,6,7而言,你只需要对应的拿走1,2,3,然后留下4个,则对方必输。但是如果你要面对的是8,不管先拿(1,2,3)个,另一个人都可以通过 8-(1,2,3) ,使得你面对4个石头,则你必输无疑。通过观察,我们发现,好像是**只要N是4的倍数,我们就必输无疑**。 -PNG +PNG 尝试性的写下代码:(这个,什么语言都无所谓吧....) @@ -59,7 +59,7 @@ func canWinNim(n int) bool { 执行结果: -PNG +PNG ## 03、证明过程 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/20/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21.md" index abf668fc..bc43fd13 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21.md" @@ -47,49 +47,49 @@ nums2 = [3, 4] 首先,我们考虑一个问题,如果只有一个有序数组,我们需要找中位数,那肯定需要判断元素是奇数个还是偶数个,如果是奇数个那最中间的就是中位数,如果是偶数个的话,那就是最中间两个数的和除以2。 -PNG +PNG 那如果是两个数组,也是一样的,我们先求出两个数组长度之和。如果为奇数,就找中间的那个数,也就是 **(长度之和 1)/2** 。如果为偶数,那就找 **长度之和/2**。比如下面的 (9 5)/2 = 7,那我们最终就是**找到排列第7位的值**。此时,问题其实已经转化为“**找到两个数组中第k小的元素**”。找到了第7位之后,第8位我们已经知道了,然后第7位和第8位的和,除以2就是我们要找的中位数(**注意:这里的7和8你其实是不知道的,图中画出来,只是为了帮助理解**) -PNG +PNG 现在的问题是,我们如何用二分的思想来找到中间排列第7位的数。这里有一种不太好想到的方式,**是用删的方式**,因为**如果我们可以把多余的数排除掉,最终剩下的那个数,是不是就是我们要找的数?** 对于上面的数组,我们可以先删掉 7/2=3 个数。那这里,可以选择删上面的,也可以选择删下面的。那这里因为 i +PNG
(删除前)
-PNG +PNG
(删除后)
由于我们已经排除掉了 3 个数字,现在对于两个数组,我们需要找到7-3=4的数字,来进行下一步运算。我们可以继续删掉4/2=2个数。我们比较i和j的值,删除小的一边。 -PNG +PNG
(删除前)
-PNG +PNG
(删除后)
继续上面的步骤,我们删除 2/2=1 个数。**同理,比较7和6的大小,删除小的一边**。删完后是下面这样: -PNG +PNG
(7和6,删除6)
不要忘记我们的目的,我们是为了找第7小的数。此时,**两个数组的第一个元素,哪个小,就是我们要找的那个数**。因为7<8,所以7就是我们要找的第7小的数。 -PNG +PNG 这里有一点比较特殊的,如果在删除过程中,我们**要删除的K/2个数,大于其中一边的数组长度**,那我们就将小的一侧数组元素都删除。比如下面这个,此时7/2=3,但是下面的数组只有2个元素,我们就将它全部删除。 -PNG +PNG 删完之后,此时因为只删除了2个元素,所以k变成了5。那我们只需要返回其中一边的第5个元素就ok。 -PNG +PNG 整个上面的过程,完成了本题的算法架构! @@ -143,4 +143,4 @@ class Solution { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/21/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22.md" index be4a87e8..fb726206 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22.md" @@ -53,19 +53,19 @@ date: 2020-07-01 - 构造一个小顶堆,依次将元素放入堆中,并保证堆中元素为k。 - PNG + PNG - 如果当前元素小于堆顶元素,那基本就不用看了(因为我们要找的是 排序后的第 k 个最大的元素) - PNG + PNG - 自然,如果我们遇到比堆顶元素大的元素,就把它放入到堆中。 - PNG + PNG - 重复上面的步骤: - PNG + PNG 然后根据分析,完成代码(今天就不手撕堆了,因为之前已经手撕过了。同时这里给大家一个建议,如果面试的时候,遇到这种TOPK的问题,**假如特别有把握,肯定得手撕数据结构,一定会加分**。但是如果没有把握,那就先用API实现,以 BugFree 为目标吧!) @@ -158,7 +158,7 @@ func partition(l, r int, nums []int) int { 执行结果: -PNG +PNG 整个快排的核心,其实就partition。partition 有 单向扫描,双向扫描 等多种写法。上面的代码,大家可以参考参考,看不懂也没关系,我后面是会单独安排一个快排的系列篇来进行讲解的,到时候一堆图解砸进来,保准你看的醍醐灌顶! diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/22/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23.md" index c73724ff..5672188b 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23.md" @@ -23,7 +23,7 @@ date: 2020-07-09 上面的题目绕得很,大概就是这么个意思: -PNG +PNG ## 02、题目分析 @@ -33,11 +33,11 @@ date: 2020-07-09 我们知道光是由西南角发出的,也就是左下角。发出之后可能会出现多种情况(注意,下图略过了部分光线反射的情况)。看起来是十分复杂,无迹可寻。 -PNG +PNG 但是如果我们把光线的运动轨迹拆开来看,就可以观测到,**光线每经过一次折反,都会在纵向距离上移动 q**(首次与东墙相距的距离)。同时,**一旦其向上行走的距离为 p 的整数倍,就一定会碰到某个接收点**(**注意:这里我们不需要考虑北面墙是否存在,根据光的反射定律可得**)可以参考一下下面这张图: -PNG +PNG 问题变得简单了,**光线最终向上走的距离,其实就是 p 和 q 的最小公倍数**。我们设最小公倍数为 L,会发现如果 L 是 p 的**奇数倍**,光线则到达**北墙**(可以参考上面的图)当 L 是 p 的 **偶数倍**,光线将会射到**南墙**。 @@ -73,7 +73,7 @@ class Solution {     执行结果: -PNG +PNG 这道题学会了吗?如果不会就不要玩镜了吧(皮一个)。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/23/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25.md" index 3394b388..0b5b2182 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25.md" @@ -88,7 +88,7 @@ C 可以放在 D (500) 和 M (1000) 的左边,来表示 400 和 900。 因为题目很长,所以读懂题意很重要。这道题说是让我们转换罗马数字,其实说白了就是让我们用特殊的规则凑数。**罗马数字本身就可以理解为一种特殊的数学规则。** -PNG +PNG 那如何来凑数?自然就需要读懂题意,比如 2 就是通过 1+1 凑;3 通过 1+1+1 凑;6 通过 5+1 凑。同时,在凑的过程中,又加入了一些奇怪的规则。比如说,4 不允许 1+1+1+1 凑,而是得 5-1 凑;而 9 不能 5+1+1+1+1 凑,而是得 10-1 凑;这个分析怎么出来的?题目中说的: @@ -106,15 +106,15 @@ C 可以放在 D (500) 和 M (1000) 的左边,来表示 400 和 900。 然后,我们把题目中所有的字符列出来: -PNG +PNG 当然,除了这些还不够。因为上面我们还分析出了一些特殊的规则,也得列出来: -PNG +PNG 然后我们利用这张表格,对给出的数字进行转化(拼凑)。假设我们要找的数为2834,大概的流程如下(其实是一种类似贪心的思想): -PNG +PNG 对比着代码看更为明朗: @@ -141,7 +141,7 @@ class Solution { 执行结果: -PNG +PNG ## 03、啰嗦一下 @@ -176,7 +176,7 @@ public: 这个解法应该没什么解释的,就是把每一位 0-10 的情况枚举出来。这道题目稍微长了点,但是分析下来并没有什么难度。有的同学一看到题目很长,直接就怂了,这种其实就很不好。唔,再放一张女神照片: -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/6.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/6.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/6.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/25/6.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26.md" similarity index 83% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26.md" index 890745c7..67c5bdf0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26.md" @@ -15,9 +15,9 @@ date: 2020-07-10 大概就是这么个意思: -PNG +PNG -PNG +PNG ## 02、题解分析 @@ -27,11 +27,11 @@ date: 2020-07-10 便于分析,我们把上面的图稍微改一下: -PNG +PNG 改成这样: -PNG +PNG 好了,这道题结束了。O(∩_∩)O @@ -53,41 +53,41 @@ Emmmm....不开玩笑,现在我们讲解如何完成这个过程。 那总共就三个颜色,我们要区分开来,是不是最少需要两条分隔线?A线的左侧为0,右侧为1。B线的左侧为1,右侧为2。 -PNG +PNG 但是刚开始的时候,红-白-蓝 三色是乱序的,所以此时的两条线我们是不是可以看成在最两侧? -PNG +PNG 那我们剩下的是不是只需要把 A线 和 B线 间的数据维护成满足 AB 线的规则就可以了?那要维护 AB 线间的数据,是不是至少你得遍历下 AB 线间的数据? -PNG +PNG 我们从 C 位置处开始,**我们发现此时 C 等于0。是不是意味着,我们应把这个元素放到 A 的左侧,所以我们移动 A线。当然,我们也需要移动一下 C 的位置。(CASE-1)** -PNG +PNG 然后我们发现**新的 C 位置处等于2,那是不是说明这个元素应该位于 B 的右侧。所以我们要把该位置的元素 和 B位置处的元素进行交换,同时移动B。(CASE-2)** -PNG +PNG 但是这里要注意,**C 交换完毕后,C 不能向前移**。因为C指向的元素可能是属于前部的,若此时 C 前进则会导致该位置不能被交换到前部。继续向下遍历。 -PNG +PNG 有意思了,**我们发现 C 指向位置处等于1。有没有发现这种本身就满足规则了?所以我们忽略就可以了。(CASE-3)** 继续移动 C。 -PNG +PNG 主要就这三种 CASE,我们把剩下的图都绘制出来: -PNG +PNG -PNG +PNG -PNG +PNG -PNG +PNG **总结一下:** @@ -147,7 +147,7 @@ func sortColors(nums []int) { 执行结果: -PNG +PNG ## 03、总结 @@ -157,7 +157,7 @@ func sortColors(nums []int) { 好吧,基本就是这样了。这道题目在 leetcode 上对应的是: -PNG +PNG 我觉得我讲的还是可以的。大家要是认为ok的话,给我来个转发吧~感谢! diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/13.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/13.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/13.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/13.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/14.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/14.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/14.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/14.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/15.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/15.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/15.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/15.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/16.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/16.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/16.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/16.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/17.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/17.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/17.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/17.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/26/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27.md" similarity index 89% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27.md" index 8e93adc4..fa61cb0e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27.md" @@ -19,7 +19,7 @@ date: 2020-07-10 大概就是这么个意思: -PNG +PNG ``` 输入:num = 9669 @@ -54,19 +54,19 @@ class Solution {     执行结果: -PNG +PNG
emmmmm,大概就是这样。。。。我感觉要被锤,溜了溜了。 -PNG +PNG ## 03、知识点总结 > 写出上面的答案,大概率是被面试官锤了。那这道题到底是考察我们什么呢? -PNG +PNG 大家可以看到,这是一道数学题。所以我们需要用数学的方法来进行求解。具体代码如下: @@ -90,11 +90,11 @@ class Solution {     其实这种解法,和上面的解法没什么区别。**都是从高位到低位进行判断,遇到 6 就将其变为 9**。只不过,上面是通过 replaceFirst 来进行,下面通过数值相加的方式来进行。那这种方法的效率我们看看: -PNG +PNG 吊炸天有没有!难怪古人说,学好数理化,走遍天下都不怕。只会 replace 画,面试结束找妈妈。 -PNG +PNG 现在你知道为什么你和别人一起去面试,面试官挂了你,而选择别人了吧。**面试官的思维,往往就是这么朴实无华且枯燥。** diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/3.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/3.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/3.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/3.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/27/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28.md" index 033dfe8c..a51e52db 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28.md" @@ -3,7 +3,7 @@ date: 2020-07-10 -PNG +PNG > 数独相信在座的各位都玩过,那我们如何使用程序去验证一个 9×9 的数独是有效的呢?一起看下! @@ -73,7 +73,7 @@ date: 2020-07-10 画出来就是下面这样: -PNG +PNG ## 02、题解分析 @@ -102,7 +102,7 @@ date: 2020-07-10 遍历这个没什么好说的,**从左到右,从上到下进行遍历即可**。就一个两层循环。因为题目本身就是常数级的规模,所以时间复杂度就是 O(1)。 -PNG +PNG 问题来了:如何验证元素在 行 / 列 / 子数独中没有重复项? @@ -119,7 +119,7 @@ int[][] sbox = new int[9][9]; 当然,刚开始的时候他们都是空的。然后**每遍历到一个元素,我们就看看这个元素在里边存不存在,不存在就放进去,存在那说明数独不合法**。 -PNG +PNG 举个栗子,比如这个数独。第6行5列为2,那我们就对 rows 和 col 进行设置:(1表示元素存在) @@ -147,11 +147,11 @@ boxIndex = (row / 3) * 3 + columns / 3 其实很容易理解:我们把上面的第6行5列代入到这个公式里,(5 / 3) * 3 + 4 / 3 = 3 + 1 = 4。这个 4 也就代表最终落到 4 的这个小区域中。 -PNG +PNG 我猜有人不能理解这个算式(是的,连公式都称不上),所以我再解释一下它是怎么来的。比如上面的第 6 行,row 为 5,5/3=1 可以理解为 **此时在第1大行上**,然后 (5/3)*3,是计算出当前第一大行处的 boxIndex 值。最后再加上的 4/3,意思是向右偏移几个大列。 -PNG +PNG 根据分析,给出代码: @@ -182,12 +182,12 @@ class Solution { 执行结果: -PNG +PNG ## 03、总结 最后,我在这里分享给大家一个很难很难的数独,欢迎大家来挑战!!挑战成功的,评论区留下你的答案! -PNG +PNG 好了,今天的题目就讲完了,我觉得讲的还是挺好的。大家要是认为ok的话,给我来个转发吧~感谢! \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/28/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29.md" similarity index 88% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29.md" index 5b0fb761..ba91817b 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29.md" @@ -27,11 +27,11 @@ date: 2020-07-11 这道题目主要考察人的估算能力。而估算界,有一个估算大牛叫做费米。 -PNG +PNG 这位大牛有多牛呢?据说第一颗原子弹正在试爆,费米随手把自己笔记本的一张纸撕成小碎片顺手一撒,碎纸随风飘落,在费米身后2米处落下。 -PNG +PNG 费米根据这个数据,心算得出核爆量大约是一万吨TNT。这个数据和一些尖端的仪器设备花了数星期时间来分析波速、波压得出的数据基本一致。 @@ -51,27 +51,27 @@ date: 2020-07-11 回到本题,我们要分析的问题是: -PNG +PNG 那我们至少得有多少辆车吧?但是并不是所有的车,每天都会上路。所以准确的说我们需要知道每天上路的车有多少。 -PNG +PNG 但是是所有上路的车都需要加油吗?当然不是,所以我们还得改改: -PNG +PNG 知道了每天上路需要加油的车辆数,我们得知道每个加油站可以满足多少辆车吧? -PNG +PNG 那加油站用什么满足车?自然是油咯。 -PNG +PNG 问题来了,那我们如何知道每天上路需要加油的车辆数?是不是我们可以转化为 北京车辆总数 / 加油频次: -PNG +PNG 这个加油频次,相信大家就很容易估算出来了。跑滴滴的一天一次油,正常开的话一周一次,开的少一点的话差不多半个月一次。 @@ -91,7 +91,7 @@ date: 2020-07-11 上面的费米估算大家应该都知道是个什么东东了。还有很多类似的题目“芝加哥的钢琴家数量”,“上海有多少滴滴”,“成都有多少家星巴克”这都是一类问题。 -PNG +PNG 其实到这里就可以结束了,但是我还是想说“数学家的嘴,骗人的鬼”,有一个叫做德雷克的数学家,他用费米估算来解释自己单身的原因: @@ -114,6 +114,6 @@ date: 2020-07-11 然鹅。他在论文发表结束后,就马上结婚了。。哈哈哈哈哈,当然,这并不是说费米估算没有用,或许是估算错误吧! -PNG +PNG 好了,基本就是这样了。周末写文不容易,求个转发,来个评论。感谢~ \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/29/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30.md" index 0e895eba..f5792309 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30.md" @@ -35,7 +35,7 @@ date: 2020-07-11 所以你应该输出1。 ``` -PNG +PNG
(难道剩下一个饼干喂狗吗?????)
@@ -47,11 +47,11 @@ date: 2020-07-11 其实策略就很简单了:**我们只需要在满足孩子胃口的前提下,尽可能分配小的饼干给到他**。典型的资本主义。 -PNG +PNG 具体怎么做呢,我们把饼干和小朋友都按照**从大到小**排列。 -PNG +PNG - 如果最大的饼干可以满足肚子最大的孩子,那就给他吃,同时比较下一个。 @@ -61,7 +61,7 @@ date: 2020-07-11 但是这里有个问题。凭什么就要先满足肚子最大的孩子。按道理讲,肚子越大应该越扛饿才对吧。所以我们换种思路,从**肚子最小的孩子**开始。 -PNG +PNG - 如果最小的饼干可以满足肚子最小的孩子,那就给他吃,同时比较下一个。 @@ -98,7 +98,7 @@ class Solution { 如果想先满足大肚子,代码也大同小异。直接从尾部向前遍历即可。执行结果: -PNG +PNG ## 03、一点分享 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/30/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31.md" index ece6026a..4c1758b4 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31.md" @@ -30,7 +30,7 @@ date: 2020-07-11 题目有点复杂,举例说明: -PNG +PNG 注意:**面板上所有格子需要同时被更新**:你不能先更新某些格子,然后使用它们的更新后的值再更新其他格子。 @@ -46,19 +46,19 @@ date: 2020-07-11 - R1:细胞数少于两个,则该位置**活细胞**死亡 - PNG + PNG - R2:有两个或三个活细胞,则该位置**活细胞**仍然存活 - PNG + PNG - R3:有超过三个活细胞,则该位置**活细胞**死亡 - PNG + PNG - R4:有三个活细胞,则该位置**死细胞**复活 - PNG + PNG 四个规则理解起来并不复杂,现在考虑如何解决问题。最自然的想法是:一个个的更新细胞状态。 @@ -66,11 +66,11 @@ date: 2020-07-11 但是这里我们会遇到一个问题:假设你每次更新完毕后,都把更新后的结果填入数组。那么当前轮其他格子的更新就会引用到你已经更新的结果。啥意思呢: -PNG +PNG 比如上面这个就是**错误**的:我们先依据规则4更新了绿色框处的状态,此时蓝色框色周围同样满足规则4。**已更新细胞的状态会影响到周围其他还未更新细胞状态的计算**。这明显不是我们想要的! -PNG +PNG 那我们最简单的思路:是不是只要我们能一直获取原始数组的数据,不就可以保证更新一直正确了吗!至于在哪里,其实不管是copy一个数组,还是说用hashmap存一下数值其实都ok。 @@ -212,7 +212,7 @@ public class Solution {     执行结果: -PNG +PNG 细心的读者也许会想到,这不就是卡诺图吗?是的。在大多数的矩阵状态变化类题目中,卡诺图、状态机 等都是一些常用的技巧。 @@ -238,9 +238,9 @@ public class Solution {     > 宽度优先搜索算法(又称广度优先搜索)是最简便的图的搜索算法之一,这一算法也是很多重要的图的算法的原型。Dijkstra单源最短路径算法和Prim最小生成树算法都采用了和宽度优先搜索类似的思想。其别名又叫BFS,属于一种盲目搜寻法,目的是系统地展开并检查图中的所有节点,以找寻结果。换句话说,它并不考虑结果的可能位置,彻底地搜索整张图,直到找到结果为止。 -PNG +PNG -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/10.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/10.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/10.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/10.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/9.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/9.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/9.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/31/9.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32.md" index 803bc1f5..f45b939d 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32.md" @@ -86,7 +86,7 @@ target = 13 第二个条件意味着可以在行里进行二分搜索确定哪个元素; -PNG +PNG 如何使用二分查找找到哪行呢?只需要一个上下边界,再每次拿着中间行最大的值和目标值比一比。 @@ -175,11 +175,11 @@ class Solution { **1,1,2,3,5,8,13,21,34,55,89,144........** -PNG +PNG
(1+1=2,2+1=3,2+3=5.....21+5+8=21+13=34)
-PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/3.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/3.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/3.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/32/3.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33.md" similarity index 90% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33.md" index 8f674d4e..c0903856 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33.md" @@ -5,11 +5,11 @@ date: 2020-07-12 > 今天是小浩算法 “365刷题计划” 第105天。这是昨天一个同学面试快手被问到的算法题,很不幸的是他被挂掉了。征得对方同意后,拿出来分享给大家~ -PNG +PNG
(如果要进入算法交流群的,扫描二维码就可以了)
-PNG +PNG ## 01、题目示例 @@ -37,7 +37,7 @@ date: 2020-07-12 题目本身没有太多需要补充的,初中数学知识: -PNG +PNG ## 02、题解分析(高级) @@ -47,11 +47,11 @@ date: 2020-07-12 首先我们可以证明一下 N 个元素的子集个数有 2^N 个: -PNG +PNG 可以类比为 N 个不同的小球,一次拿出若干个小球(可以不拿),对于每一个球都可以选择拿或者不拿,共有 N 个球,总共判断 N 次,产生了 2^N 个子集。比如:123,共有下面 8 个子集: -PNG +PNG 然后考虑解题思路,**暂且不谈回溯,我们其实可以用二进制来模拟每个元素是否选中的状态。** 又因为我们已知了对于 N 个元素共有 2^N 个子集,所以我们直接遍历 2^N 个元素。 @@ -104,11 +104,11 @@ class Solution { 为帮助大家理解,假设 nums 为 [1,2,3],res 的存储过程为: -PNG +PNG 大家可以仔细体会一下这个题解。 -PNG +PNG ## 03、题解分析(普通) @@ -118,11 +118,11 @@ class Solution { 集合中所有元素的选/不选,其实构成了一个满二叉树。左子树选,右子树不选。自然,那从根节点到所有叶子节点的路径,就构成了所有的子集。 -PNG +PNG
(旋转90°)
-PNG +PNG 那这种解法其实就好理解很多了: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/4.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/4.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/4.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/4.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/33/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34.md" similarity index 86% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34.md" index 0979dc9d..848f1f82 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34.md" @@ -5,7 +5,7 @@ date: 2020-07-12 > 今天是小浩算法 “365刷题计划” 第106天。互联网公司面试,经常会出现一些奇奇怪怪的题目。今天就为大家扒几道。(第二道题目由读者提供,是真实的头条面试数据分析岗位对方问到的。防止题目侵权,本文给出的是**相似题型**) -PNG +PNG ## 01、量出4升水 @@ -21,23 +21,23 @@ date: 2020-07-12 题目没什么补充的,直接分析,一个3升和5升的水桶: -PNG +PNG 首先用三升水桶装满水,倒入五升水桶: -PNG +PNG 再次倒满三升水桶,填满后继续倒入五升水桶,直到五升水桶倒满。 -PNG +PNG 清空五升水桶,将三升水桶的一升水倒入: -PNG +PNG 再次填满三升水桶,倒入五升水桶中: -PNG +PNG ## 02、最大的钻石 @@ -53,9 +53,9 @@ date: 2020-07-12 不要认为这种题目不会出现在面试中,恰恰相反,这类题目出现的概率非常高。这不,有读者就碰到了。下面两个是知乎中也遇到该题的读者截图: -PNG +PNG -PNG +PNG 那这种问题主要考察面试者的什么能力呢?一个是面试临场随机应变的能力。第二就是分析问题的能力。 @@ -71,11 +71,11 @@ date: 2020-07-12 其实这个问题的原型叫做秘书问题,该类问题全部属于**最佳停止问题**。 -PNG +PNG 这类问题都有着统一的解法: -PNG +PNG 所以到我们的题目里,我们也是可以直接给出答案:**我们要选择先放弃前 37%(就是1/e)的钻石,此后选择比前 37% 都大的第一颗钻石。** @@ -87,7 +87,7 @@ date: 2020-07-12 事实上也有人通过测试证明了这个数据: -PNG +PNG 当 n=30 时,测试一万次,可以看到有 4000 次我们拿到了最大的钻石。 @@ -107,13 +107,13 @@ date: 2020-07-12 等等。这里再给出一个严谨的推导过程: -PNG +PNG ## 03、思维定势 > 下面这道题也是一道常见的智力题,但是这道题绝对不会出现在面试中了。拿出来分享给大家的原因,是期望不要被思维定势局限。 -PNG +PNG 这道题中有六个停车位,每个车位上都有一个数字,然而有一个车位上的数字被汽车挡住了,要求学生们在20秒内答出这个被挡住的车位上的数字。这是中国香港小学一道给6岁儿童设计的“停车场智力题”。(**大家可以在评论区留下答案**) diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/13.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/13.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/13.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/13.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/34/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50.md" similarity index 85% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50.md" index 3e7524e2..b889c6ba 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50.md" @@ -3,7 +3,7 @@ date: 2020-07-11 -PNG +PNG > 今天和大家聊聊关于图的一些知识。 @@ -15,11 +15,11 @@ date: 2020-07-11 在数据结构中,图是什么呢?喏,就是这样: -PNG +PNG Emmmm.....或者说常见一点的: -PNG +PNG 图是一个比树形关系复杂一点点,比线性关系复杂两点点的东东。 @@ -51,11 +51,11 @@ Emmmm.....或者说常见一点的: 图里最基本的单元是顶点(vertex),相当于树中的节点。顶点之间的关联关系,被称为边(edge)。而边可以分配一个数值(正负都ok),这个数值就叫做权重。 -PNG +PNG
(数据取自真实数据.....)
-PNG +PNG 当然,这里值得一提的是,树也可以被当做简单的图,而链表也可以被当做简单的树。 @@ -67,15 +67,15 @@ Emmmm.....或者说常见一点的: **边没有方向的图称为无向图。**比如说我微信里同时加了这5个妹子,这5个妹子也都认识我。 -PNG +PNG 突然有一天,除了小花,其他四个妹子同时间都把我拉黑了。我的微信里能看到她们,她们却看不到我。 -PNG +PNG 然后嘞,无向图就变成了有向图: -PNG +PNG ## 04、完全图 @@ -85,7 +85,7 @@ Emmmm.....或者说常见一点的: 在无向图中,若每对顶点之间都有一条边相连,则称该图为完全图。大概就是这样: -PNG +PNG 而在有向图中,若每对顶点之间都有二条有向边相互连接,也算是完全图。 @@ -99,7 +99,7 @@ Emmmm.....或者说常见一点的: 循环图中的循环二字,指的是**起点和终点是同一节点时**产生的路径。所以,**循环图和有向图或无向图并没有什么关系,因为都有可能产生循环**。有向图,那就遵循边的方向。无向图,那只要成环就行。 -PNG +PNG 这三个: @@ -111,7 +111,7 @@ Emmmm.....或者说常见一点的: 那第二个,更多的是被称为,有向无环图 DAG(Directed Acyclic Graph。那下面这个也是 : -PNG +PNG 那上面这个像不像一棵树。。。。。所以计算机结构中的树(大多都是有向的),其实就是一个DAG。 @@ -123,11 +123,11 @@ Emmmm.....或者说常见一点的: 这个没啥好说的了,就是边有长度的图(**这个长度可以是各种含义**)。大部分我们接触到的图,都是加权图。 -PNG +PNG 但是这里如果细分的话,又分出来了。**顶点加权图和边加权图。** 说白了,就是有人发现如果只给边加上权值(就是长度)并不够用,有时候也需要给顶点加上权值。 -PNG +PNG ## 07、连通图 @@ -137,15 +137,15 @@ Emmmm.....或者说常见一点的: 连通的图,就是连通图: -PNG +PNG 如果不通了,就是非连通图:(这是一个图) -PNG +PNG 那没有连通在一起的这两坨(或者说移动的这两坨),我们叫作**岛**。(画外音,也许当年给联通移动起名的,就是程序员。从这里看,联通和移动本身就是对立的) -PNG +PNG 所以,如果我们的图里包含岛,那就是非连通图。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/13.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/13.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/13.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/13.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/14.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/14.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/14.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/14.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/15.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/15.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/15.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/15.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/16.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/16.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/16.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/16.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/17.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/17.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/17.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/17.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/18.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/18.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/18.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/18.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/50/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51.md" similarity index 87% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51.md" index 23cca923..bfb60a00 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51.md" @@ -3,7 +3,7 @@ date: 2020-07-11 -PNG +PNG > 今天是小浩算法 “365刷题计划” 第103天。这是前几天一个同学去滴滴面试的原题。 @@ -61,7 +61,7 @@ date: 2020-07-11 题目理解起来还是很容易的: -PNG +PNG ## 02、题解分析 @@ -71,23 +71,23 @@ date: 2020-07-11 我们用代码来旋转矩阵,肯定不能说像拿着一个东西整体直接旋转,类似这样: -PNG +PNG 一般容易想到的是,一层层的从外到内旋转每一圈(至于为什么不从内到外,如果你觉得方便,也ok),也就是俗称的找框框: -PNG +PNG 对每个框框,其实都有 4 个顶点: -PNG +PNG 剩下的就是交换这四个顶点的值: -PNG +PNG 交换完毕之后,再继续交换移动后的四个顶点: -PNG +PNG 那代码实现其实就很简单了: @@ -123,15 +123,15 @@ class Solution { 那我们除了找框框之外,还能不能有一些别的解法呢?当然可以,想想小时候我们通过对折来完成的填字游戏。 -PNG +PNG 我们观察这个矩阵: -PNG +PNG 我们观察这个矩阵,向右旋转90°,是不是可以理解为**先上下翻转,再沿对角线翻转**: -PNG +PNG 根据分析,完成代码(其实应该用Go写,交换元素会方便许多....): @@ -160,15 +160,15 @@ class Solution {     执行结果: -PNG +PNG ## 03、算法小知识 > 骑士巡逻(英语:Knight's tour)是指在按照国际象棋中骑士的规定走法走遍整个棋盘的每一个方格,而且每个网格只能够经过一次。假若骑士能够从走回到最初位置,则称此巡逻为“封闭巡逻”,否则,称为“开巡逻”。对于8*8棋盘,一共有26,534,728,821,064种封闭巡逻,但是到底有多少种开巡逻仍然未知。 -PNG +PNG -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/12.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/12.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/12.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/12.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/13.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/13.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/13.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/13.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/3.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/3.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/3.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/3.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/8.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/8.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/8.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/8.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/51/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52.md" index 0acb4727..f415866e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52.md" @@ -19,11 +19,11 @@ date: 2020-07-12 很容易筛选面试者。 -PNG +PNG
-PNG +PNG ## 01、题目示例 @@ -48,7 +48,7 @@ date: 2020-07-12 题目理解较为容易,给定 n = 3,那就生成一个 3^2 = 9 的矩阵。大家看下面的图可能更加直观一些: -PNG +PNG ## 02、题解分析 @@ -66,19 +66,19 @@ date: 2020-07-12 然后模拟向内环绕的过程,逐层填充: -PNG +PNG 这种方法其实有一个专业点的名字,叫做:蛇形填数
-PNG +PNG
这里额外说一下,除了上面这种填充方式外,还有一种填充方式: -PNG +PNG 两者的区别,只是边界条件设定不同。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/14.\345\205\266\344\273\226\350\241\245\345\205\205\351\242\230\347\233\256/52/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/021.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/021.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/021.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/021.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022.md" index 27c56ce6..12653767 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022.md" @@ -21,7 +21,7 @@ date: 2020-07-08 对于上面这个群体(请先自行判断是否可以归为此类),**刷题的目的基本是为了面试**。不管我多么巧舌如簧,告诉你算法可以提高思维,增强逻辑,是成为top coder的必然条件,等等等等。但最终都还是会回归到这个目的:**面试**。 -PNG +PNG 所以现在我们换掉问题:**没什么刷题经验的同学为了面试需要刷多少道题**?我的答案是:200道。 @@ -54,7 +54,7 @@ date: 2020-07-08 如果你有上面的疑惑,那么:你错了。坚持不下来一天一道的人和刷完200道题,毛关系都没有。回到我上面的例子,200道题目里。大概easy在130-150道左右,medium在30-50道,hard只占据了不到20道题。 -PNG +PNG 跑步和刷题不同。跑步是越来越慢,刷题却是越来越快的。对于初学者(正常人),在每一个tag刷了10道左右简单题之后,基本同类型的题目可以提高到每天2-3道easy题目,有的掌握好的,甚至能提高到每天刷5-10题。很多同类型题目,基本都是一个模子刻出来的。 @@ -76,7 +76,7 @@ date: 2020-07-08
-PNG +PNG
@@ -90,7 +90,7 @@ date: 2020-07-08 能。刷题本身就是一个学习的过程。比如二叉树的题,刷个30道,你一定会遇到BST。所以我个人认为学习系统的算法知识(也就是你们问我的,要不要买一本书,先看一遍再进行刷题)和 刷题 本身并不矛盾。你可以双管齐下,也可以单点突破,都ok。主要是,干就对了。 -PNG +PNG 到这里就会出现另一个问题,“我是从头刷,还是分类刷?” 我的建议是,如果稍微有点算法基础,你就从头刷leetcode前200道题。如果完全没有算法基础,可以考虑分tag来刷。并不是说按照tag的方式更好,而是在没有算法基础的前提下分tag来刷,除了掌握题型之外,对于知识的掌握很有益处。(想一想初高中是如何学习的)那为什么又说从头刷也是可以的?这个是因为,如果一直刷某一种类型的题,容易出现刷完一类忘掉前一类的问题,也容易对某一类题目疲惫。总之,**使用哪种方式取决于你**。关键是:干就对了! diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/2.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/2.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/2.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/2.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/4.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/4.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/4.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/022/4.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023.md" similarity index 99% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023.md" index f1d249b8..00c5c130 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023.md" @@ -5,7 +5,7 @@ date: 2020-07-12 今天的文章,不浪,没图。给大家加加油! -PNG +PNG 回顾过去一年,京东、知乎、美团、微博、去哪儿、滴滴等。爆出裁员的有多少,虽然最终都被官方辟谣。**但是,你们懂的。** diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/2.\346\214\207\345\257\274\345\255\246\344\271\240/023/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/001/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002.md" index 1785cbe5..a17ec73d 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002.md" @@ -48,7 +48,7 @@ 具体过程如下图所示: -PNG +PNG >我们需要注意的是,在处理基准元素的过程中,**如果基准元素和任一一个元素无法匹配,则说明不存在最长公共元素。** @@ -81,6 +81,6 @@ func longestCommonPrefix(strs []string) string { 运行结果: -PNG +PNG 当然,我们也可以用分治法或者其他方法来解答这道题目。你可以自己尝试尝试哈。我们下期见! diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/002/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003.md" similarity index 97% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003.md" index 71bb745e..9d1ef371 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003.md" @@ -6,7 +6,7 @@ 在leetcode上,股票相关的题目有8道之多: -PNG +PNG 而且这一类型的题,面试时出现的频率非常的高。稍微改一改条件,就让我们防不胜防。那我们如何攻克这一类题型呢?我们从最简单的一道开始看起: @@ -63,7 +63,7 @@ 假设给定的数组为:[7, 1, 5, 3, 6, 4] 我们将其绘制成折线图,大概是下面这样: -PNG +PNG 如我们上面分析,我们要在满足1和2的条件下获取最大利益,其实就是尽可能多的低价买入高价卖出。而**每一次上升波段,其实就是一次低价买入高价卖出**。而我们没有限制交易次数,也就是我们需要**求出所有的上升波段的和**。上图里就是A+B,也就是(5-1)+(6-3) = 7,就是我们能获取到的最大利益。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/003/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004.md" index e3f3e7d8..f24927f9 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004.md" @@ -51,13 +51,13 @@ 如下图可以看到5,6,7 被移动到 数组头部。 -PNG +PNG 通过观察我们可以得到,我们要得到最终的结果。**我们只需要将所有元素反转,然后反转前 k 个元素,再反转后面l-k个元素,就能得到想要的结果。** 如下图: -PNG +PNG ## 03、题目解答 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/004/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005.md" index 71f69c80..95d74324 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005.md" @@ -26,7 +26,7 @@ 具体过程如下图所示: -PNG +PNG 根据分析,我们可以得到下面的题解: @@ -78,7 +78,7 @@ func removeElement(nums []int, val int) int { 移除的具体过程: -PNG +PNG 根据分析,我们可以得到下面的题解: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/2.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/2.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/2.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/005/2.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006.md" index b5e51cb9..1710f547 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006.md" @@ -45,11 +45,11 @@ 大概是下面这样:(这个图解...真的有点太简单了...) -PNG +PNG 当然,这里我们需要考虑一种特殊情况,就是类似99,或者999,我们需要进行拼接数组。具体如下图: -PNG +PNG 通过以上分析,我们最后只需要将其转换成代码即可!这样看来,“加1”是不是也不像想象中的那么简单? diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/006/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007.md" similarity index 89% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007.md" index 61a7819c..a3a47f82 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007.md" @@ -41,7 +41,7 @@ func twoSum(nums []int, target int) []int { 执行结果: -PNG +PNG > 运行成功,但是该种解题方式的时间复杂度过高,达到了O(n²)。为了对运行时间复杂度进行优化,我们需要一种更有效的方法来检查数组中是否存在目标元素。我们可以想到用**哈希表**的方式,通过以空间换取时间的方式来进行。 @@ -53,15 +53,15 @@ func twoSum(nums []int, target int) []int { <1> 首先,我们还是先遍历数组 nums,i 为当前下标。我们需要将每一个遍历的值放入 map 中作为 key。 -PNG +PNG <2> 同时,对每个值都判断 map 中是否存在 **target-nums[i]** 的 key 值。在这里就是 9-7=2。我们可以看到 2 在 map 中已经存在。 -PNG +PNG <3> 所以,2 和 7 所在的 key 对应的 value,也就是 [0,1]。就是我们要找的两个数组下标。 -PNG +PNG ## 03、Go语言示例 @@ -84,4 +84,4 @@ func twoSum(nums []int, target int) []int { 执行结果: -PNG \ No newline at end of file +PNG \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/2.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/2.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/2.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/2.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/007/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008.md" index e6daf76d..6ccd13a0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008.md" @@ -48,19 +48,19 @@ date: 2020-07-06 求解过程如下:首先我们先把数组排个序(原因一会儿说),排完序长这样: -PNG +PNG 因为我们要同时找三个数,所以**采取固定一个数,同时用双指针来查找另外两个数的方式**。所以初始化时,我们选择固定第一个元素(当然,这一轮走完了,这个蓝框框我们就要也往前移动),同时将下一个元素和末尾元素分别设上 left 和 right 指针。画出图来就是下面这个样子: -PNG +PNG 现在已经找到了三个数,当然是计算其三值是否满足三元组。但是这里因为我们已经排好了序,如果**固定下来的数(上面蓝色框框)本身就大于 0,那三数之和必然无法等于 0**。比如下面这种: -PNG +PNG 然后自然用脚指头也能想到,我们需要移动指针。现在我们的排序就发挥出用处了,**如果和大于0,那就说明 right 的值太大,需要左移。如果和小于0,那就说明 left 的值太小**,需要右移。(上面这个思考过程是本题的核心) 整个过程如下图所示: -PNG +PNG 其中:在第6行时,因为三数之和大于0,所以right进行了左移。最后一行,跳过了重复的-1。 @@ -110,7 +110,7 @@ class Solution { 执行结果: -PNG +PNG 给一个python版本的(这个我就直接拿别人的代码了,思想都一样) diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/008/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009.md" index b62aedc6..7d674dec 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009.md" @@ -53,7 +53,7 @@ E C I H N T S G ``` -PNG +PNG ## 02、题目分析 @@ -67,7 +67,7 @@ T S G 假若我们采用示例2的数据来进行分析,输入字符串 s 为 "LEETCODEISHIRING", numRows 为 4 ,画成图大概长这样: -PNG +PNG 重点来了,**我们的目标是按行打印,那总得有个东西来存储每行的数据吧**?因为只需要存储**每行**的数据,那是不是用个数组就可以了。(当然,你硬说搞个map来存也没啥毛病,就是有点闲得蛋疼) @@ -75,23 +75,23 @@ T S G 问题来了,那数组设置多大呢?自然是有多少行我们就设置多大呗,换句话说,numRows多大,我们的数组就设置多大。画成图大概就是下面这个样子: -PNG +PNG 存储的容器有了,原字符串也列出来是啥样了,现在嘎哈?自然就是把原字符串放到容器里咯。怎么放?**根据 numRows 的大小来回进行放置即可**(即从0到n-1,再从n-1到0)。具体的请看下图: -PNG +PNG 上面的图长得不得了,但是观察我们能看出来,**每 2n-2 即为一个周期**。到了这里,应该没有人会质疑这是一道小学题目了吧。。。把所有的字符串放完之后,大概就是下面这个样子: -PNG +PNG 最后一步,咱们让这个数组排排坐,就可以开始吃果果: -PNG +PNG 如果看不清楚,不如这样: -PNG +PNG 根据分析,得出代码(好久没翻go的牌子了): @@ -119,7 +119,7 @@ func convert(s string, numRows int) string { 执行结果: -PNG +PNG 上面的代码要强调两点: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/1.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/1.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/1.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/1.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/3.\346\225\260\347\273\204\347\263\273\345\210\227/009/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101.md" index bf36f408..88a25c05 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101.md" @@ -10,7 +10,7 @@ 比如原链表为a->b->c,则加了哨兵节点的链表即为x->a->b>c,如下图: -PNG +PNG 那我们为什么需要引入哨兵节点呢?举个例子,比如我们要删除某链表的第一个元素,**常见的删除链表的操作是找到要删元素的前一个元素**,假如我们记为 pre。我们通过: @@ -47,7 +47,7 @@ > 首先我们思考,让我们删除倒数第N个元素,那我们**只要找到倒数第N个元素就可以了**,那怎么找呢?我们**只需要设置两个指针变量,中间间隔N-1元素。当后面的指针遍历完所有元素指向nil时,前面的指针就指向了我们要删除的元素。**如下图所示: -PNG +PNG 接下来,我们只要同时定位到要删除的元素的前1个元素,通过前面讲过的删除操作,就可以很顺利的完成这道题目啦。 @@ -63,7 +63,7 @@ 下面是解题过程图,可以看得更清楚哦。 -PNG +PNG ## 04、题目解答 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/3.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/3.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/3.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/101/3.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102.md" index 3b9b2908..114dc759 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102.md" @@ -29,7 +29,7 @@ l2 = [1,3,4] 同时我们设定一个 "prehead" 的哨兵节点,大概是下面这样: -PNG +PNG ## 02、题目图解 @@ -37,15 +37,15 @@ l2 = [1,3,4] 1. 首先我们将 prehead 指向 l1 或者 l2 中比较小的一个。如果相等,则任意一个都可以。此时的 l1 为 [2,4],l2 为 [1,3,4] - PNG + PNG 2. 我们继续上面的步骤。将 prehead 的链表指向 l1 和 l2 中较小的一个。现在这里就是指向1。 - PNG + PNG 3. 反复上图步骤。 - PNG + PNG 4. 现在 prehead.Next 就是我们需要的链表。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/102/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103.md" index 01772962..a246618f 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103.md" @@ -17,7 +17,7 @@ 解释:链表中有一个环,其尾部连接到第二个节点。 ``` -PNG +PNG **示例 2:** @@ -27,7 +27,7 @@ 解释:链表中有一个环,其尾部连接到第一个节点。 ``` -PNG +PNG **示例 3:** @@ -37,7 +37,7 @@ 解释:链表中没有环。 ``` -PNG +PNG > **题目可能你会觉得过于简单!但是不妨耐心看完!** > @@ -134,7 +134,7 @@ var hasCycle = function(head) { 假设链表为 PNG, 其步骤如下: -PNG +PNG 分析完毕,直接上代码: @@ -165,7 +165,7 @@ func hasCycle(head *ListNode) bool { 如果没看懂,我们来分析:在快的快追上慢的时,他们之间一定是只差 1 个或者 2 个格子。如果落后 1 个,那么下一次就追上了。如果落后 2 个,那么下一次就落后 1 个,再下一次就能追上!如下图: -PNG +PNG 所以我们的快指针的步长可以设置为 2 。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/103/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104.md" index 16815dc6..f2eee258 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104.md" @@ -53,23 +53,23 @@ date: 2020-07-09 老样子,我们还是先画图,假若我们的链表是 (2 -> 4 -> 3) + (5 -> 6 -> 4) ,大概就是这样(注意,这里我们其实是要完成 342 + 465): -PNG +PNG 加法肯定是从最低位到最高位进行相加,也就是这里的**链表头到链表尾进行相加,所以需要遍历链表**。我们令 l1 和 l2 指向两个链表的头,用一个 tmp 值来存储同一位相加的结果,以及一个新的链表来存储 tmp 的值。(为什么不直接用新链表存储结果,而是用 tmp 先存储结果,再用新链表存储 tmp 的值呢?请继续往下看) -PNG +PNG 记住:**所有模拟运算的题目,都需要考虑进位**。这里因为个位不涉及进位,开始计算十位。我们同时遍历 l1,l2,以及新链表到下一位。 -PNG +PNG 重复上面的操作,可以看到十位与个位不同,发生了进位。这时,刚才的 tmp 就有了用武之地。**我们使用 tmp 携带进位的值到下一位的运算**。自然,这里的链表也不能直接存储 tmp 的值了,而是要存储 tmp%10 的值。重复这个步骤,**直到两个链表都遍历完成,并且 tmp 没有进位值**: -PNG +PNG 现在只需要返回我们的新链表就可以了。问题来了,**因为我们没有构造哨兵节点,所以此时不太容易直接返回新链表**。所以在整个流程的第一步,我们还需要用一个哨兵节点指向我们的新链表。 -PNG +PNG 分析完毕,直接上代码(好久没翻Go的牌子了): @@ -99,7 +99,7 @@ func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode { 执行结果: -PNG +PNG ## 03、总结 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/4.\351\223\276\350\241\250\347\263\273\345\210\227/104/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/201/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202.md" similarity index 98% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202.md" index 864439d0..553b97b8 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202.md" @@ -63,7 +63,7 @@
分析完毕,我们绘制成图(图中假定 nums 为 [-2,1,-3,4,-1,2,1,-5,4]): -PNG +PNG ## 03、Go语言示例 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/202/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203.md" index a38ae734..87cc7023 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203.md" @@ -33,7 +33,7 @@ 我们假定nums为[1,9,5,9,3],如下图: -PNG +PNG 我们分两种情况进行讨论: @@ -58,7 +58,7 @@ 分析完毕,我们绘制成图: -PNG +PNG ## 03、Go语言示例 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/2.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/2.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/2.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/203/2.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204.md" similarity index 92% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204.md" index 9dbb0710..e6c4aeed 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204.md" @@ -34,13 +34,13 @@ [4,1,8,3]] -PNG +PNG 那从上到下的最小路径和就是2-3-5-1,等于11。 由于我们是使用数组来定义一个三角形,所以便于我们分析,我们将三角形稍微进行改动: -PNG +PNG 这样相当于我们将整个三角形进行了拉伸。这时候,我们根据题目中给出的条件:每一步只能移动到下一行中相邻 @@ -50,7 +50,7 @@ 到[3,1]和[3,2]的位置上。如下图所示: -PNG +PNG 题目明确了之后,现在我们开始进行分析。题目很明显是**一个找最优解的问题,并且可以从子问题的最优解进** @@ -64,7 +64,7 @@ 继续分析,如果我们要求dp[i][j],那么其一定会从自己头顶上的两个元素移动而来。 -PNG +PNG 如5这个位置的最小路径和,要么是从2-3-5而来,要么是从2-4-5而来。然后取两条路径和中较小的一个即可。进 @@ -74,17 +74,17 @@ 但是,我们这里会遇到一个问题!除了最顶上的元素之外, -PNG +PNG **最左边的元素只能从自己头顶而来**。(2-3-6-4) -PNG +PNG **最右边的元素只能从自己左上角而来**。(2-4-7-3) 然后,我们观察发现,**位于第2行的元素,都是特殊元素**(**因为都只能从[0,0]的元素走过来**) -PNG +PNG 我们可以直接将其特殊处理,得到: @@ -153,7 +153,7 @@ func min(a, b int) int { 运行结果: -PNG +PNG 运行上面的代码,我们发现使用的内存过大。我们有没有什么办法可以压缩内存呢?通过观察我们发现,**在我们** @@ -161,7 +161,7 @@ func min(a, b int) int { **据**。绘制成图如下: -PNG +PNG 优化后的代码如下: @@ -205,5 +205,5 @@ func min(a, b int) int { 运行结果: -PNG +PNG diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/1.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/1.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/1.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/1.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/2.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/2.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/2.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/2.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/4.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/4.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/4.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/4.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/5.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/5.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/5.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/5.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/6.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/6.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/6.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/6.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/7.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/7.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/7.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/7.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/9.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/9.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/9.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/204/9.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205.md" index e43a43c8..38329981 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205.md" @@ -34,7 +34,7 @@ 首先我们分析题目,要找的是 **最小路径和,** 这是个啥意思呢?假设我们有一个 m * n 的矩形 :[[1,3,1],[1,5,1],[4,2,1]] -PNG +PNG 那从**左上角到右下角**的最小路径和,我们可以很容易看出就是 1-3-1-1-1 ,这一条路径,结果等于 7 。 @@ -50,7 +50,7 @@ 继续分析,根据题目给的条件,如果我们要求 dp[i][j] ,那么它一定是从自己的上方或者左边移动而来。如下图所示: -PNG +PNG >
5,只能从3或者1移动而来
> @@ -71,7 +71,7 @@ - 最上面一行,只能由左边移动而来(1-3-1) - 最左边一列,只能由上面移动而来(1-1-4) -PNG +PNG 最后,因为我们的目标是**从左上角走到右下角**,**整个网格的最小路径和其实就是包含右下角元素的最小路径和**。即: @@ -125,11 +125,11 @@ func min(a, b int) int { 运行结果: -PNG +PNG 同样,运行上面的代码,我们发现使用的内存过大。有没有什么办法可以压缩内存呢?通过观察我们发现,**在我们自左上角到右下角计算各个节点的最小路径和的过程中,我们只需要使用到之前已经累积计算完毕的数据,并且不会再次访问之前的元素数据**。绘制成图如下:(大家看这个过程像不像扫雷,其实如果大家研究扫雷外挂的话,就会发现在扫雷的核心算法中,就有一处颇为类似这种分析方法,这里就不深究了) -PNG +PNG 优化后的代码如下: @@ -163,7 +163,7 @@ func min(a, b int) int { 运行结果: -PNG +PNG
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/205/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206.md" index 4f9d066b..498ba580 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206.md" @@ -60,11 +60,11 @@ 如果是状态一,偷盗含第 i 个房间时能获取的最高金额,我们相当于要**找到偷盗每一间房子时可以获取到的最大金额**。比如下图,我们要找到 dp[4] ,也就是偷盗 9 这间房子时,能获取到的最大金额。 -PNG +PNG 那我们就需要找到与9不相邻的前后两段中能获取到的最大金额。 -PNG +PNG 我们发现题目进入恶性循环,因为我们若要找到与9不相邻的两端中能偷盗的最大金额,根据 dp[i] 的定义,我们就又需要分析在这两段中盗取每一间房子时所能获取的最大利益!想想都很可怕!所以我们放弃掉这种状态的定义。 @@ -78,7 +78,7 @@ (相当于小贼背了个背包,里边装了之前偷来的财物,每到达下一个房间门口,来选择是偷还是不偷。) -PNG +PNG ## 03、GO语言示例 @@ -114,7 +114,7 @@ func max(a,b int) int { 运行结果: -PNG +PNG 同样,运行上面的代码,我们发现使用的内存过大。有没有什么办法可以压缩内存呢?我们很容易想到,在小贼偷盗的过程中,不可能转回头去到自己已经偷过的房间!(太蠢)小偷只需要每次将财物搬到下一个房间就行! @@ -150,5 +150,5 @@ func max(a,b int) int { 运行结果: -PNG +PNG diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/5.\345\212\250\346\200\201\350\247\204\345\210\222\347\263\273\345\210\227/206/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301.md" index 199d21ae..7de013f7 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301.md" @@ -38,7 +38,7 @@ 具体过程如下图所示: -PNG +PNG ## 03、Go语言示例 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/301/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302.md" index c56a1ec4..7d745dc3 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302.md" @@ -30,7 +30,7 @@ s = "loveleetcode", 图解如下: -PNG +PNG ## 03、GO语言示例 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/302/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303.md" index 95cb4561..ff540014 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303.md" @@ -67,23 +67,23 @@ date: 2020-07-08 一般来讲,字符串匹配算法第一步,**都是把目标串和模式串对齐**。不管是KMP,BM,SUNDAY都是这样。 -PNG +PNG 而对于SUNDAY算法,我们**从头部开始比较,一旦发现不匹配,直接找到主串中位于模式串后面的第一个字符**,即下面绿色的 “s”。(这里说明一下,为什么是找模式串后面的第一个字符。在把模式串和目标串对齐后,如果发现不匹配,那肯定需要移动模式串。问题是需要移动多少步。各字符串匹配算法之间的差别也来自于这个地方,对于KMP,是建立部分匹配表来计算。BM,是反向比较计算移动量。对于SUNDAY,就是找到模式串后的第一个字符。因为,无论模式串移动多少步,模式串后的第一个字符都要参与下一次比较,也就是这里的 “s”) -PNG +PNG 找到了模式串后的第一个字符 “s”,接下来该怎么做?我们需要**查看模式串中是否包含这个元素,如果不包含那就可以跳过一大片,从该字符的下一个字符开始比较。** -PNG +PNG 因为仍然不匹配(空格和l),我们继续重复上面的过程。找到模式串的下一个元素:t -PNG +PNG 现在有意思了,我们发现 t 被包含于模式串中,并且 t 出现在模式串倒数第3个。所以我们把模式串向前移动3个单位: -PNG +PNG 有内味了,我们发现竟然匹配成功了,是不是很神奇?证明的过程今天暂且不谈(后面我会出一个算法证明篇,来证明之前讲过的一些算法。**我需要你做的是,掌握上面这些!**) diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/303/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304.md" similarity index 98% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304.md" index 8fb6946f..0ca22b74 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304.md" @@ -98,7 +98,7 @@ func printNumbers(n int) []int { 执行结果: -PNG +PNG ## 04、题目继续升级 @@ -112,7 +112,7 @@ func printNumbers(n int) []int { 这里先复习一下大数加法:在加法运算的时候假如有两个10000位数的两个数进行相加,那么用int、long、double型都装不下这么多位数,**一般采用char数组来实现加法运算,解决精度的问题**。说白了是啥意思,我们用 1234567 和 1234 来模拟一下: -PNG +PNG - 取两个数位数大的一个作为数组长度 - 对两个数建立char数组,保存每一位上的值 @@ -197,7 +197,7 @@ public void printNumbers(int n) { 同样,我也实验了一下,如果我硬性的把代码改成数组的形式,然后在leetcode测试用例中构造 n = 10,就会出现这个: -PNG +PNG 所以建议大家是在IDE里练习,今天的题目到这里就结束了。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/304/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305.md" index cffb9465..bd3bec38 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305.md" @@ -81,7 +81,7 @@ class Solution { 执行结果: -PNG +PNG 然后上面的代码大家肯定也觉得简单的一批。但是既然我们都知道哪些字符是幺蛾子(**除了字母和数字,都是幺蛾子**),为啥子不直接遍历的时候跳过嘞?这样是不是就不用先做一个替换的预处理了。 @@ -115,7 +115,7 @@ class Solution { 执行结果: -PNG +PNG 好吧,那既然我们都可以把幺蛾子跳过了,那有木有现成的跳过幺蛾子的API来用嘞?我找了找,java 中没有特别现成的拿来主义,但是我又不想造轮子,那就去别的语言里找找呗。 @@ -151,7 +151,7 @@ class Solution: 然后,我还想祭出终极大杀器 之 战斗魔鬼! -PNG +PNG ## 03、总结 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/305/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306.md" similarity index 81% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306.md" index 6b51ed39..c9b69f83 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306.md" @@ -33,27 +33,27 @@ KMP 其实已经念念叨叨挺长时间了,一直没写的原因是我觉得 上面说了,**KMP 是由暴力匹配改进的字符串匹配算法**。那什么是暴力匹配?假若我们的目标串和模式串如下图。(之前在 Sunday 匹配中讲过,**所有的字符串匹配算法第一步都是对齐**。不管是 暴力匹配,KMP,Sunday,BM 都是一样) -PNG +PNG 暴力匹配,就是目标串和模式串一个一个的对比。 -PNG +PNG 当A匹配成功,继续开始比对,直到我们遇见一个不匹配的字符。 -PNG +PNG 然后我们调整模式串,**从目标串的下一个字符开始匹配(注意,这里是核心)**。很遗憾,还是没有匹配成功(A和B) -PNG +PNG 继续这个步骤: -PNG +PNG 直到我们完成整个匹配过程: -PNG +PNG 假若我们目标串长度为m,模式串长度为n。模式串与目标串至少比较m次,又因其自身长度为n,所以理论的时间复杂度为**O(m\*n)。** 但我们可以看到,**因为途中遇到不能匹配的字符时,就可以停止,并不需要完全对比(比如上图第2行)**。所以虽然理论时间复杂度为 **O(m\*n)** ,但其实大部分情况效率高很多。 @@ -85,71 +85,71 @@ func BFSearch(haystack string, needle string) int { 接下来我们开始说KMP。假如还是上面的这个串。最开始其实还是一样,我们依次对比A-A,B-B,C-C,直到遇见第一个无法匹配的字符A-E。 -PNG +PNG 现在开始不一样了,如果按照上面的暴力匹配。此时目标串我们应该回到 B 这个位置,模式串应直接回到头。但是按照 KMP 的思路,**在我们在第一次匹配后,因为 BC 匹配成功了,所以我们知道了 BC 不等于 A(注意这个逻辑关系)**: -PNG +PNG 那既然已知了 BC 不等于 A,我们就没必要用 A 和 BC 进行匹配了。那我们直接用 A 越过前面不需要匹配的 BC: -PNG +PNG 继续向下适配,我们发现在 D-C 处,匹配不上了。 -PNG +PNG 那我们因为前面的 B 又匹配成功了,那我们就知道 B 不等于 A,所以我们又可以直接略过前面的 B: -PNG +PNG 也就是说,我们可以直接从 D 处开始比较: -PNG +PNG 继续向下比较: -PNG +PNG 到现在为止,你已经掌握了 KMP 的前百分之五十:**在KMP中,如果模式串和目标串没有匹配成功,目标串不回溯**。现在我们需要换一个新串,来掌握接下来的百分之五十: -PNG +PNG 我们还是从头开始匹配,直到遇到第一个不匹配的字符: -PNG +PNG 到这里和上面的例子还是一样,**因为我们的 BC 匹配成功了,所以我们知道 BC 不等于 A,所以我们可以跳过 BC(注意这个逻辑)**: -PNG +PNG 所以我们从 A 处开始比较: -PNG +PNG 直到我们再次匹配失败: -PNG +PNG 我想到现在你已经知道怎么做了,来和我一起说。**因为前面的 B 匹配成功了,所以我们知道 B 不等于 A,所以我们可以跳过 B。** 当然,跳过之后下一次的匹配直接失败了(A-D)。 -PNG +PNG 重点来了!!!然后我们继续匹配下一位。我们发现这一次,我们的匹配基本就要匹配成功了,但是卡在了最后一步的比较(D-B)。 -PNG +PNG 现在怎么办?假若我们把两个串修改一下(把里边的AB修改成XY),那么显而易见,你当然知道从哪里开始: -PNG +PNG 但是现在的问题是,在模式串中 AB 重复出现了,那我们是不是可以在下次比较的时候直接把 AB 给让出来? -PNG +PNG 所以我们把这个AB让出来,让出来之后,我们相当于在 模式串 上又跳过了 2个字符。(也就是说模式串下一次匹配从C开始) -PNG +PNG 其实到这里 KMP 就基本完事了。我们可以稍微总结下: @@ -178,11 +178,11 @@ func BFSearch(haystack string, needle string) int { 在我们上面的示例中,未成功的字符前的子串是 ABCEAB,它相同的最长的真前缀和真后缀就是 AB,最大长度就是2。所以我们就把模式串回溯到第2个位置处。 -PNG +PNG 我猜有人要说话了,“不是说模式串是回溯到真前缀和真后缀的最大长度位置处吗?那为什么上面的第一个例子,是回到了起始位置呢?” -PNG +PNG 其实,不是我们没有回溯模式串,而是此时的最大长度(指的是相同真前缀和真后缀的最大长度,后面都省略)其实就是 0。 @@ -190,7 +190,7 @@ func BFSearch(haystack string, needle string) int { 那我们怎么获取最大长度呢?就可以很自然的引入 next表 了。**不管你是把next表 理解成描述最大长度的东东,还是把 next表 理解成用来回溯模式串的东东,其实都是可以的!!!这也是为什么你在网上看到很多人文章对next表理解不一致的原因。** -PNG +PNG 我们拿上面标黄色那个解释一下,ABCEAB 不包含自己,那就是 ABCEA,ABCEA的 真前缀 和 真后缀 为: @@ -203,19 +203,19 @@ func BFSearch(haystack string, needle string) int { 所以最大长度就是 1。那这个 1 干啥用呢?我们可以在下次比的时候就直接把这个 A 让过去,直接从 B 开始比。 -PNG +PNG 这里注意,如果我们模式串稍微修改成下面这样,此时 F 的最大长度就是 0,并不是 2。初学者很容易把 AB 误认为是最长相同的真前缀和真后缀。 -PNG +PNG 到这里为止,其实 KMP 的思路已经快说完了。但是大神说话了,大神认为这个匹配表,还得再改改,不然会出问题。 -PNG +PNG 为什么会出问题呢,我们说了,对 KMP 而言,**如果没有匹配成功,** **目标串是不回溯的**。那如果目标串不回溯,如果模式串一直都是 0,是不是意味着这个算法就没办法继续进行下去?所以大神把这个 next匹配表 改了一下,把 0 位置处的 next表 值改为了 -1。 -PNG +PNG 那这个 -1 是干嘛用的呢?**其实只是一个代码技巧**!大家注意一下第 7 行代码,假若没有 j == -1,此时如果 next[j] 等于 0,是不是就进死循环了。而加上这一句,相当于说无论什么情况下,模式串的第一个字符都可以匹配(对 j 而言,此时 -1++,是不是还是0。但是此时模式串却向前走了。不就不会因为死循环而卡死了吗?**请大家自行脑补没有 j==-1 这行代码时,死循环卡死在11行的过程**) @@ -250,7 +250,7 @@ func KmpSearch(haystack string, needle string, next []int) int { 我们用下面这个字符串来讲一下:XXYXXYXXX。 -PNG +PNG 对于该字符串: @@ -267,65 +267,65 @@ func KmpSearch(haystack string, needle string, next []int) int { - 首先 index[0] 肯定是填写 0 - PNG + PNG - 然后填写 index[1]。**如果匹配上,我们把 i 和 j 都加一**。 - PNG + PNG - 然后填写 index[2],**如果没有匹配上,就把 j 回溯到 j 当前指向的前一个位置的 index 处。在这里,也就是 0 。** - PNG + PNG - 注意,是回溯完成后才开始填表,此时 index[2] 为 0 - PNG + PNG - 然后我们移动 i,发现下一位匹配成功。同时给 i 和 j 加一,并填表。 - PNG + PNG - 填完表后,我们发现下一位仍然匹配。继续移动 i 和 j。 - PNG + PNG
(填表)
- PNG + PNG
(仍然匹配,继续移动 i 和 j)
- 仍然匹配成功,继续重复上面的操作。 - PNG + PNG - PNG + PNG - PNG + PNG - 注意,**到这里开始匹配失败了**。上面说了,如果没有匹配成功,**把 j 回溯到 j 当前指向的前一个位置的 index 处**。在这里,也就是 2 。 - PNG + PNG - PNG + PNG
(j 的前一个位置的 index)
- PNG + PNG
(回溯完成后,我们发现仍然不匹配)
- 继续这个回溯的过程。。。(这一步是整个 next表 构建的核心) - PNG + PNG
(这个蓝色的小标是下次的回溯位置)
- PNG + PNG
(回溯后,我们发现匹配成功了)
- PNG + PNG
(然后我们可以填表了)
@@ -335,19 +335,19 @@ func KmpSearch(haystack string, needle string, next []int) int { 细心的读者,估计到这里发现一点问题。我们把填完后的表拿出来: -PNG +PNG 我们发现这个表和我们最上面说的不太一样,我们最上面说的 next表 的首位是 -1,并且要记录哪一个 index 位置的 next 值,是去看该元素前面所有子串的真前缀和真后缀的最大长度。这句话有点拗口,我们还是看到下面这个。 -PNG +PNG 比如 index 为 5 时,此时next的值是看 ABCEA 的最大长度(真后缀A,真前缀A,所以为1)。**但是在我们下面这个表中,我们发现我们是记录的当前索引位置处的最大长度**。其实我这里要说一下,下面这个表,其实我们一般称为**部分匹配表**,或者pmt。 -PNG +PNG 那这个表和我们的 next 表有什么关系吗,我们发现把这个表往后串一位,就得到了我们最终的 next 表。 -PNG +PNG 但是但是但是!!!并不是所有讲解 KMP 的地方都会给你提一提部分匹配表的概念,有的地方干脆就直接把这个 pmt 等同于 next 表使用。**这种属于错误讲解吗?其实不是的!** 因为我上面也说了,next表 在最初始位置补 -1,或者甚至干脆把 pmt 的第一位补一个 -1 当作 next表,这都统统是可以的。**因为最关键的还是说你到时候怎么去使用!毕竟 next表 的定义也是人们给它赋予的!** diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/10.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/10.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/10.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/10.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/11.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/11.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/11.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/11.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/12.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/12.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/12.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/12.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/13.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/13.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/13.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/13.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/14.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/14.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/14.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/14.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/15.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/15.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/15.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/15.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/16.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/16.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/16.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/16.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/17.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/17.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/17.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/17.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/18.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/18.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/18.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/18.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/19.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/19.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/19.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/19.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/20.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/20.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/20.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/20.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/21.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/21.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/21.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/21.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/22.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/22.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/22.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/22.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/23.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/23.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/23.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/23.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/24.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/24.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/24.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/24.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/25.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/25.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/25.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/25.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/26.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/26.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/26.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/26.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/27.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/27.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/27.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/27.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/28.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/28.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/28.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/28.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/29.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/29.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/29.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/29.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/30.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/30.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/30.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/30.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/31.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/31.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/31.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/31.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/32.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/32.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/32.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/32.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/33.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/33.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/33.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/33.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/34.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/34.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/34.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/34.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/35.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/35.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/35.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/35.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/36.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/36.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/36.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/36.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/37.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/37.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/37.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/37.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/38.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/38.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/38.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/38.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/39.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/39.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/39.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/39.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/40.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/40.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/40.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/40.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/41.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/41.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/41.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/41.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/42.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/42.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/42.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/42.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/43.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/43.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/43.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/43.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/44.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/44.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/44.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/44.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/45.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/45.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/45.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/45.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/46.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/46.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/46.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/46.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/47.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/47.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/47.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/47.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/48.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/48.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/48.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/48.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/49.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/49.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/49.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/49.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/50.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/50.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/50.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/50.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/51.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/51.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/51.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/51.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/306/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307.md" index ad72df79..48b3e8a0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307.md" @@ -37,7 +37,7 @@ date: 2020-07-12 题意还是很容易理解的,说白了就是每次把前面的元素放到最后面: -PNG +PNG ## 02、题解分析 @@ -47,7 +47,7 @@ date: 2020-07-12 这道题目最容易想到的解法,其实就是跟着题意来。每次将旋转后的A和目标串对比: -PNG +PNG ```java //java @@ -72,11 +72,11 @@ class Solution { 但是代码其实并不优雅,我们继续观察一下这个字符串: -PNG +PNG 无论它怎样旋转,最终的 A + A包含了所有可以通过旋转操作从 A 得到的字符串: -PNG +PNG 那我们是不是只需要判断 B 是否为 A + A 的子串就可以了: @@ -91,11 +91,11 @@ class Solution {     执行结果: -PNG +PNG 一般面试写的话,基本就是到这个程度。但是大概率面试官这时还会问你一个问题:如何继续进行优化? -PNG +PNG 注意我们上面问题,其实已经转化为了:**判断 B 是否为 A + A 的子串**。那我们就可以引申答出 KMP,SUNDAY,BF 等字符串匹配策略。(当然,这里其实 SUNDAY 并不是特别适合) @@ -145,7 +145,7 @@ class Solution { > KMP算法是一种改进的字符串匹配算法,由D.E.Knuth,J.H.Morris和V.R.Pratt提出的,因此人们称它为克努特—莫里斯—普拉特操作(简称KMP算法)。KMP算法的核心是利用匹配失败后的信息,尽量减少模式串与主串的匹配次数以达到快速匹配的目的。具体实现就是通过一个next()函数实现,函数本身包含了模式串的局部匹配信息。KMP算法的时间复杂度O(m+n)。 -PNG +PNG 大家有兴趣可以看我之前写的一篇KMP教程: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/6.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/6.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/6.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/6.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/7.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/7.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/7.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/307/7.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308.md" index 32f95002..34944b50 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308.md" @@ -13,7 +13,7 @@ date: 2020-07-12 暂定的目标是一周 3-5 篇题解。希望大家支持!一起进步!奥利给! -PNG +PNG ## 01、题目示例 @@ -52,7 +52,7 @@ date: 2020-07-12 但这里可以取一个巧,我们可以通过一个 count 来记数,**从第一个不为空格的数开始记起**。换句话说,如果末尾处为空格,此时 count 值为 0,可以直接略过。 -PNG +PNG 实现代码如下: @@ -126,7 +126,7 @@ public String trim() {   可以看到,Java 中的 trim 函数除了去除空格之外,还去除了所有在 ASCII 码表中排行小于等于空格的字符。 -PNG +PNG 空格在 ASCII 码表中排行是 32位,可以看到 tab,换行,回车等都在 trim 的控制范围内。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/6.\345\255\227\347\254\246\344\270\262\347\263\273\345\210\227/308/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401.md" index b1a9d761..ed215431 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401.md" @@ -42,15 +42,15 @@ <1>我们要对根节点的最大深度求解,就要对其左右子树的深度进行求解 -img +img <2>我们看出。以4为根节点的子树没有左右节点,其深度为 1 。而以 20 为根节点的子树的深度,同样取决于它的左右子树深度。 -img +img <3>对于15和7的子树,我们可以一眼看出其深度为 1 。 -img +img <4>由此我们可以得到根节点的最大深度为: @@ -89,7 +89,7 @@ func max(a int, b int) int { 其实我们上面用的递归方式,本质上是使用了DFS的思想。先介绍一下DFS:深度优先搜索算法(Depth First Search),对于二叉树而言,它沿着**树的深度遍历树的节点,尽可能深的搜索树的分支**,**这一过程一直进行到已发现从源节点可达的所有节点为止**。 -img +img 如上图二叉树,它的访问顺序为: @@ -136,7 +136,7 @@ private List traversal(TreeNode root) {     List re 如果不理解代码,请看下图: -img +img 1:首先将a压入栈 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/401/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402.md" index 3886d65a..a3438be0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402.md" @@ -31,7 +31,7 @@ BFS,广度/宽度优先。其实就是**从上到下,先把每一层遍历完之后再遍历一下一层**。假如我们的树如下: -img +img 按照BFS,访问顺序如下: @@ -47,9 +47,9 @@ BFS,广度/宽度优先。其实就是**从上到下,先把每一层遍历 假设给定二叉树为[3,9,20,null,null,15,7],图解如下: -img +img -img +img 根据以上分析,代码如下: @@ -81,7 +81,7 @@ func dfs(root *TreeNode, level int, res [][]int) [][]int { 具体步骤如下图: -img +img 根据以上分析,代码如下: diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/3.jpeg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/3.jpeg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/3.jpeg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/3.jpeg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/402/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403.md" index f0d05013..b1473d95 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403.md" @@ -15,11 +15,11 @@ 比如下面这就是一颗二叉搜索树: -img +img 下面这两个都不是: -img +img <1>图中4节点位置的数值应该大于根节点 @@ -90,9 +90,9 @@ func isBST(root *TreeNode,min, max int) bool{ 运行结果: -img +img 如果觉得上文中的递归不太容易理解,可以通过下图理解: -img +img diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/3.png" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/3.png" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/3.png" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/3.png" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/403/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404.md" index ef1ecc17..f4f301db 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404.md" @@ -55,7 +55,7 @@ 如下图就是一棵典型的BST: -img +img ## 03、图解分析 @@ -67,7 +67,7 @@ - 如果val大于当前结点的值,转向其右子树继续搜索; - 如果已找到,则返回当前结点。 -img +img >
很简单,不是吗?
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/404/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405.md" similarity index 91% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405.md" index f319ce39..da9cbbff 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405.md" @@ -71,7 +71,7 @@ key = 3 如下图就是一棵典型的BST: -img +img ## 03、图解分析 @@ -81,19 +81,19 @@ key = 3 1、待删除的节点左子树为空,让待删除节点的右子树替代自己。 -img +img 2、待删除的节点右子树为空,让待删除节点的左子树替代自己。 -img +img 3、如果待删除的节点的左右子树都不为空。我们需要找到**比当前节点小的最大节点(前驱)**,来替换自己 -img +img 或者**比当前节点大的最小节点(后继)**,来替换自己。 -img +img 分析完毕,我们一起看代码怎么实现吧。 @@ -147,5 +147,5 @@ func deleteMinNode( root *TreeNode ) *TreeNode { 执行结果: -img +img diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/405/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406.md" index b077f0e4..fa593623 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406.md" @@ -51,7 +51,7 @@ 我们先复习一下之前对于树高度的求解: -img +img 这里唯一要注意的是,当我们判定**其中任意一个节点如果不满足平衡二叉树时,那说明整棵树已经不是一颗平衡二叉树**,我们可以**对其进行阻断,不需要继续递归下去**。 @@ -59,7 +59,7 @@ 另外,需要注意的是,下面这棵并不是平衡二叉树: -img +img ## 03、代码分析 @@ -105,5 +105,5 @@ func abs(a int) int { 执行结果: -img +img diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/406/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407.md" similarity index 89% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407.md" index 124bc036..d5c4edf3 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407.md" @@ -17,7 +17,7 @@ date: 2020-06-11 比如下面这颗: -img +img 那什么又是完全二叉树呢: @@ -29,11 +29,11 @@ date: 2020-06-11 比如下面这颗: -img +img 而这颗就不是: -img +img 熟悉了概念,我们还是一起来看题目吧。 @@ -77,7 +77,7 @@ func countNodes(root *TreeNode) int { 执行结果: -img +img 但是很明显,出题者肯定不是要这种答案。因为这种答案和完全二叉树一毛钱关系都没有。所以我们继续思考。 @@ -89,19 +89,19 @@ func countNodes(root *TreeNode) int { 假如我们有树如下: -img +img 我们看到根节点的左右子树高度都为3,那么说明左子树是一颗满二叉树。因为节点已经填充到右子树了,左子树必定已经填满了。所以左子树的节点总数我们可以直接得到,是2^left - 1,加上当前这个root节点,则正好是2^3,即 8。然后只需要再对右子树进行递归统计即可。 -img +img 那假如我们的树是这样: -img +img 我们看到左子树高度为3,右子树高度为2。说明此时最后一层不满,但倒数第二层已经满了,可以直接得到右子树的节点个数。同理,右子树节点+root节点,总数为2^right,即2^2。再对左子树进行递归查找。 -img +img 根据分析,得出代码: @@ -133,4 +133,4 @@ class Solution { 运行结果: -img \ No newline at end of file +img \ No newline at end of file diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/9.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/9.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/9.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/407/9.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408.md" similarity index 90% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408.md" index 3799e7ef..cc7d47b0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408.md" @@ -27,7 +27,7 @@ date: 2020-06-11 输出: [1,null,0,null,1] ``` -img +img **解释: ** @@ -43,7 +43,7 @@ date: 2020-06-11 输出: [1,null,1,null,1] ``` -img +img **示例3:** @@ -52,7 +52,7 @@ date: 2020-06-11 输出: [1,1,0,1,1,null,1] ``` -img +img **说明:** @@ -67,15 +67,15 @@ date: 2020-06-11 就是下面这样: -img +img 剪枝之后是这样: -img +img 剪什么大家应该都能理解。那关键是怎么剪?过程也很简单,**在递归的过程中,如果当前结点的左右节点皆为空,且当前结点为0,我们就将当前节点剪掉即可。** -img +img 根据分析,很自然得出代码: @@ -99,7 +99,7 @@ func deal(node *TreeNode) *TreeNode { 运行结果: -img +img
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/7.\344\272\214\345\217\211\346\240\221\347\263\273\345\210\227/408/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501.md" index 32f7c7a8..ed5702eb 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501.md" @@ -50,7 +50,7 @@ date: 2020-06-12 假设 nums = [1,3,-1,-3,5,3,6,7],和 k = 3,窗口数为6 -img +img 根据分析,直接完成代码: @@ -76,7 +76,7 @@ class Solution { 运行结果: -img +img
@@ -90,7 +90,7 @@ class Solution { 首先,我们了解一下,什么是双端队列:是一种具有**队列和栈的性质的数据结构**。双端队列中的元素可以从两端弹出或者插入。 -img +img 我们可以利用双端队列来实现一个窗口,目的是让该窗口可以做到**张弛有度**(汉语博大精深,也就是长度动态变化。其实用游标或者其他解法的目的都是一样的,就是去维护一个可变长的窗口) @@ -102,7 +102,7 @@ class Solution { 假设 nums = [1,3,-1,-3,5,3,6,7],和 k = 3 -img +img > (小浩os:我觉得自己画的这个图对于双端队列的解法还是介绍的比较清晰的,大家好好看一下哦,这样我的努力也就没有白费呢。) @@ -140,7 +140,7 @@ func maxSlidingWindow(nums []int, k int) []int { 执行结果: -img +img
diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/501/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502.md" index 023bccdd..ce1bc4ef 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502.md" @@ -69,15 +69,15 @@ Now,我们通过一道题目来进行具体学习吧 直接分析题目,假设我们的输入为“abcabcbb”,我们只需要维护一个窗口在输入字符串中进行移动。如下图: -img +img 当下一个元素在窗口没有出现过时,我们扩大窗口。 -img +img 当下一个元素在窗口中出现过时,我们缩小窗口,将**出现过的元素以及其左边的元素**统统移出: -img +img 在整个过程中,我们**记录下窗口出现过的最大值**即可。而我们唯一要做的,只需要**尽可能扩大窗口**。 @@ -113,7 +113,7 @@ public class Solution { 执行结果: -img +img 通过观察,我们能看出来。如果是最坏情况的话,我们每一个字符都可能会访问两次,left一次,right一次,时间复杂度达到了O(2N),这是不可饶恕的。不理解的话看下图: @@ -121,7 +121,7 @@ public class Solution { 假设我们的字符串为“abcdc”,对于abc我们都访问了2次。 -img +img 那如何来进一步优化呢? @@ -129,7 +129,7 @@ public class Solution { 其实我们可以定义**字符到索引的映射**,而不是简单通过一个集合来判断字符是否存在。这样的话,当我们**找到重复的字符时,我们可以立即跳过该窗口**,而不需要对之前的元素进行再次访问。 -img +img 优化代码如下: @@ -152,7 +152,7 @@ public class Solution { 执行结果: -img +img 修改之后,我们发现虽然时间复杂度有了一定提高,但是还是比较慢!如何更进一步的优化呢?我们可以使用一个256位的数组来替代hashmap,以进行优化。(因为ASCII码表里的**字符**总共有128个。ASCII码的长度是一个字节,8位,理论上可以表示256个字符,但是许多时候只谈128个。具体原因可以下去自行学习~) @@ -180,7 +180,7 @@ class Solution { 执行结果: -img +img 我们发现优化后时间复杂度有了极大的改善!这里简单说一下原因,对于数组和hashmap访问时,两个谁快谁慢不是一定的,需要思考hashmap的底层实现,以及数据量大小。但是在这里,因为已知了待访问数据的下标,可以**直接寻址**,所以极大的缩短了查询时间。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/6.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/6.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/6.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/6.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/7.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/7.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/7.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/7.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/8.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/8.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/8.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/502/8.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503.md" index ab654fa1..e0791d90 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503.md" @@ -66,7 +66,7 @@ date: 2020-06-12 我们通过双指针维护一个窗口,由于我们只需要判断字母异位词,我们可以将窗口初始化大小和目标串保持一致。(当然,你也可以初始化窗口为1,逐步扩大) -img +img 而**判断字母异位词**,我们需要**保证窗口中的字母出现次数与目标串中的字母出现次数一致**。这里因为字母只有26个,直接使用数组来替代map进行存储(和上一讲中的ASCII使用256数组存储思想一致)。 @@ -74,13 +74,13 @@ date: 2020-06-12 pArr为目标串数组,sArr为窗口数组。我们发现初始化数组,本身就满足,记录下来。(**这里图示用map模拟数组,便于理解**) -img +img 然后我们通过移动窗口,来更新窗口数组,进而和目标数组匹配,匹配成功进行记录。每一次窗口移动,**左指针前移**,原来**左指针位置处的数值减1,表示字母移出**;**同时右指针前移**,**右指针位置处的数值加1,表示字母移入**。详细过程如下: -img +img -img +img 最终,当右指针到达边界,意味着匹配完成。 @@ -144,7 +144,7 @@ class Solution { 执行结果: -img +img PS:本题属于模式解法,非最优解!这里留下思考内容,如何在本解法的基础上进行优化,近一步降低时间复杂度? diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/503/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504.md" similarity index 94% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504.md" index cc0a1f9a..77e6800f 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504.md" @@ -45,23 +45,23 @@ date: 2020-07-08 假若我们输入的 target 为 9,大脑中应该有下面这么个玩意: -PNG +PNG 然后我们通过左右指针来维护一个滑动窗口,同时计算窗口内的值是否是目标值: -PNG +PNG 如果窗口的值过小,我们就移动右边界。 -PNG +PNG 如果窗口的值过大,我们就移动左边界。 -PNG +PNG 剩下的就是反复上面的操作就可以了。到这里分析过程看似结束了。但是我们可以观察出一丢丢规律,用来优化我们的算法。**对于任意一个正整数,总是小于它的中值与中值+1的和**。为了让大家直观,用下图举例: -PNG +PNG 比如这里的100,就一定小于50+51,换成其他数也一样。换句话说,**一旦窗口左边界超过中值,窗口内的和一定会大于 target**。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/8.\346\273\221\345\212\250\347\252\227\345\217\243\347\263\273\345\210\227/504/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601.md" similarity index 98% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601.md" index ee322476..82d47f43 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601.md" @@ -49,7 +49,7 @@ date: 2020-06-14 所以犯人甲的结论是,**唯一理性的选择就是背叛同伙**,把一切都告诉警方!这样的话,如果他的同伙笨得只会保持沉默,那么他就会是那个离开的人。而如果他的同伙也根据这个逻辑向警方交代了,那么也没有关系,起码他不必服最重的刑! -img +img ## 03、囚徒困境与纳什均衡 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/601/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602.md" similarity index 96% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602.md" index b13db486..1df76dc0 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602.md" @@ -11,7 +11,7 @@ date: 2020-06-14 | ------------------------------------------------------------ | | 羊羊医院里统计了两种胆结石治疗方案的治愈率。在统计过程中,医生将病人分为大胆结石和小胆结石两组。统计结果如下: | -img +img - 对于小胆结石而言,手术A的治愈率(93%)高于 手术B(87%) @@ -25,7 +25,7 @@ date: 2020-06-14 但是真的是这样吗?当然不是,我们根据样本统计出大小胆结石总计的治愈率,发现**手术B(治愈率83%)其实是要高于手术A(治愈率78%)**。 -img +img 为什么会出现这样的结果?这就是著名的**辛普森悖论。** diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/602/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/603.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/603.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/603.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/603.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/604.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/604.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/604.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/604.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605.md" similarity index 98% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605.md" index ff19a0eb..b263b47f 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605.md" @@ -35,7 +35,7 @@ date: 2020-07-01 用博弈论中的报酬矩阵,将图画出来,可能更加有助于大家思考: -PNG +PNG - 如果小猪和大猪同时行动的话,则它们同时到达食槽,分别得到1个单位和5个单位的纯收益(付出4个单位的成本) - 如果大猪行动,小猪等待,小猪可得到4个单位的纯收益,大猪得到的6个单位,付出2个单位的成本,实得4个单位; diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/605/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606.md" index 6d1dcf3b..46d92509 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606.md" @@ -27,7 +27,7 @@ date: 2020-07-05 其实这个问题答案是比较反直觉的:**没有变化**。原因是因为:**生男生女的概率永远都是百分之50**。不相信的话,你可以尝试去当一下妇产科大夫,若干年后一定可以得出这个结论。 -PNG +PNG 或者我们也可以换一种思路:我们不妨假设把一大批新婚夫妇关在一个超大的屋子里,逼着他们进行一轮一轮的生孩子游戏。第一轮里,有一半的夫妇生了男娃,退出了游戏;另一半夫妇得到的是女娃,进入第二轮。在第二轮里面,又有一半由于生出男娃而退出,自然,另一半生出女娃的夫妇进入第三轮……注意到,在每一轮里,新生男娃和新生女娃都是一样多的,因此把所有轮数合在一起看,男娃的总数和女娃的总数也一定是相同的。 @@ -43,11 +43,11 @@ date: 2020-07-05 2、**身体酸碱度。** 酸性体质容易疲惫,让人感觉到累。所以很多养生专家建议让身体处于碱性环境。前面这个,我觉得还是没问题的。但是养生专家同时也说:碱性环境下生孩子的几率会大一点。(这个我就搞不懂了??) -PNG +PNG 3、先有人后,才做数据统计,其他自己悟。如果悟不出来,可以看看家后面的那口井,只能说细思极恐。(并且我个人认为这是主要原因。。) -PNG +PNG 4、突然写到这里就不想写了,看到上面结论有点难受。。。就这样吧。。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/606/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607.md" similarity index 93% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607.md" index d4c4bbeb..9798b62e 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607.md" @@ -23,13 +23,13 @@ date: 2020-07-06 连续投掷三次,能产生八种结果,“正反反”和“反反正”两种可能性各占 1/8,序列也完全对称,获胜概率怎么说都应该是一样的。 -PNG +PNG 所以对B而言,不应该有任何理由来怀疑该玩法的公平性。但是,答案真的是这样吗?事实,该游戏并不公平。虽然“正反反”和“反反正”在频率上出现的一样,但是其之间却有一个竞争关系:**一旦抛硬币产生其中一种序列,游戏即结束**。所以不论何时,只要抛出一个正面,也就意味着B必输无疑。换句话说,在整个游戏的前两次抛掷中,只要出现“正正”,“正反”,“反正”其中任一,A则一定会取得胜利。A和B的概率比达到3:1,优势不言而喻。 -PNG +PNG -PNG +PNG ## 03、加强版 @@ -39,7 +39,7 @@ date: 2020-07-06 一副扑克牌不算大小王刚好是52张,随意洗牌。如果出现连续三张牌,花色依次是红黑黑,那么玩家A加一分;同时把翻开了的牌都丢掉,继续一张张翻没翻开的牌;类似地,一 旦出现连续三张牌恰好是黑黑红,则玩家B得一分,弃掉已翻开的牌后继续。结果会如何呢?(大家不妨写一个程序来进行验证) -PNG +PNG 上面的问题请认真思考(毕竟硬币题目只是简化版本,下面这种才是面试时更容易被问到的),评论区留下你们的想法,写的好的顶你到天花板。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/607/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608.md" similarity index 97% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608.md" index 857b9da1..ea3fa806 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608.md" @@ -19,11 +19,11 @@ date: 2020-07-06 作为聪明机智的小浩(没见过这么夸自己的),最后当然是小浩获胜。获胜的方法:**小浩强烈要求先手进行游戏,并且在游戏开始时,先把正中间的两个小圆圈涂黑,于是左右两边各剩下了49个圆圈**。像是下面这样: -PNG +PNG 然后小浩开始模仿(逼死)面试官,面试官在左边涂掉哪些圆圈,小浩就对称地在右边涂掉哪些圆圈;面试官在右边涂掉哪些圆圈, 小浩就对称地在左边涂掉哪些圆圈。因此,只要面试官有走的,小浩就一定有走的,最终保证能获胜。 -PNG +PNG ## 03、改编版 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/2.gif" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/2.gif" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/2.gif" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/608/2.gif" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609.md" similarity index 89% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609.md" index ee81f422..4ff4b39f 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609.md" @@ -23,19 +23,19 @@ date: 2020-07-06 作为聪明机智的小浩(没见过这么夸自己的),最后当然是小浩获胜。获胜的方法:**只要小浩一直保持巧克力是正方形就可以了**。刚开始,巧克力是10×10的,长这样: -PNG +PNG 不管面试官咋掰,最后都会掰成一个长宽不相等的正方形。举个栗子,假若面试官把巧克力掰成6×10的: -PNG +PNG 小浩就再把它掰成6×6的: -PNG +PNG 不管面试官咋整,小浩都将其变成正方形,直到最后一次将其变成一个1×1的巧克力,此时面试官就输掉了面试。哦不,是小浩赢得了面试。 -PNG +PNG ## 03、超级改编版 @@ -45,7 +45,7 @@ date: 2020-07-06 如果巧克力换成边长为10的等边三角形,长这样: -PNG +PNG 每次只能**沿着线条掰下一个小等边三角形吃掉**,假若还是由面试官开局,请问,谁必胜?评论区留下你的分析过程吧(另外小浩为了感谢广大读者一直以来的支持,后面每周都会送出**百元红包**,得奖率20%,拉到最下面就可以参与了。如果可以的话,要是能帮我再点个**在看**,我将感激涕零~) diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/609/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610.md" similarity index 95% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610.md" index f6238363..9d8f95b5 100644 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610.md" +++ "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610.md" @@ -29,19 +29,19 @@ date: 2020-07-08 我们是有十条鱼,分析起来是比较麻烦的。所以我们从最简单的两条鱼开始分析: -PNG +PNG 两条鱼的情况下,第二条鱼就是无敌的存在,他不用担心自己被吃掉!如果是三条鱼: -PNG +PNG 3条鱼的情况下,第2条鱼不能吃第1条鱼,否则将化为只有2条鱼的情形,它将会被第3条鱼吃掉。如果是四条鱼,就有意思了: -PNG +PNG 此时第2条鱼可以大胆地吃掉第1条鱼,因为根据前面的结论,它知道第3条鱼是不敢吃它的。问题来了,五条鱼会如何: -PNG +PNG 5条鱼的情况下,第2条鱼是不敢吃第1条鱼的,因为如果它吃了第一条鱼。问题转化为4条鱼的场景,原3号鱼就可以大胆吃掉原2号鱼,因为它知道4号鱼是不敢吃它的,否则5号鱼就会吃掉4号鱼(绕不绕) @@ -82,7 +82,7 @@ date: 2020-07-08 这里值得强调的一点是,信息不对称 和 不完全信息,这两个的概念是有所不同的。划重点:不完全信息同时是经济学和博弈论中的概念,但是信息不对称大多指经济学中概念。这个大家了解一下即可(其实我个人觉得这种东东理解其本质就ok了,并不需要过于较真)下面的问题,摘自《经济学基础》题库 -PNG +PNG 理论的东西就是这么枯燥,总之大家拿到这种题目知道怎么分析就ok了。 diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/1.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/1.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/1.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/1.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/2.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/2.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/2.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/2.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/3.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/3.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/3.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/3.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/4.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/4.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/4.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/4.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/5.jpg" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/5.jpg" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/5.jpg" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/9.\345\215\232\345\274\210\350\256\272\347\263\273\345\210\227/610/5.jpg" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/README.md" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/README.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/sourcefile/README.md" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/sourcefile/README.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/\345\222\214\345\260\217\346\265\251\345\255\246\347\256\227\346\263\225(0820\347\211\210\346\234\254).pdf" "b/PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/\345\222\214\345\260\217\346\265\251\345\255\246\347\256\227\346\263\225(0820\347\211\210\346\234\254).pdf" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_2_\347\256\227\346\263\225\345\233\276\350\247\243\351\242\230\345\205\270/\345\222\214\345\260\217\346\265\251\345\255\246\347\256\227\346\263\225(0820\347\211\210\346\234\254).pdf" rename to "PART_2_\345\212\233\346\211\243\345\233\276\350\247\243/\345\222\214\345\260\217\346\265\251\345\255\246\347\256\227\346\263\225(0820\347\211\210\346\234\254).pdf" diff --git "a/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/README.md" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/README.md" new file mode 100644 index 00000000..dc9b7e8c --- /dev/null +++ "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/README.md" @@ -0,0 +1,13 @@ +## PART_3_大厂面试 + +考虑到现在网上面经实在太杂,很多都冠以 “BAT” 之名,重复率、错误率都非常高。所以我尽可能的挑选出了我认为比较好的 50 篇面经(基本不重复),并对内容做了分类。 + +建议大家把这个页面收藏起来,防止后面需要的时候找不到了。 + +希望大家可以点个 star 支持一下~ + +- [系统设计-长文(非常建议读,我自己也看了)](https://github.com/donnemartin/system-design-primer/blob/master/README-zh-Hans.md) +- [后端-社招(两年): 蚂蚁 头条 PingCAP](https://github.com/aylei/interview) +- [后端-京东-JAVA](https://www.cnblogs.com/wupeixuan/p/8908524.html#%E4%B8%80%E3%80%81java) +- [后端-百度-高并发抢红包设计](https://github.com/xbox1994/Java-Interview/blob/master/MD/%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1-%E9%AB%98%E5%B9%B6%E5%8F%91%E6%8A%A2%E7%BA%A2%E5%8C%85.md) +- [NLP(机器学习)-百度](https://www.e-learn.cn/topic/95743) diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\344\272\254\344\270\234\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\344\272\254\344\270\234\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\344\272\254\344\270\234\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\344\272\254\344\270\234\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\215\216\344\270\272\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\345\215\216\344\270\272\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\215\216\344\270\272\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\345\215\216\344\270\272\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\244\264\346\235\241\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\345\244\264\346\235\241\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\244\264\346\235\241\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\345\244\264\346\235\241\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\273\264\346\273\264\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\346\273\264\346\273\264\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\273\264\346\273\264\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\346\273\264\346\273\264\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\347\231\276\345\272\246\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\347\231\276\345\272\246\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\347\231\276\345\272\246\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\347\231\276\345\272\246\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\347\276\216\345\233\242\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\347\276\216\345\233\242\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\347\276\216\345\233\242\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\347\276\216\345\233\242\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\350\205\276\350\256\257\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\350\205\276\350\256\257\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\350\205\276\350\256\257\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\350\205\276\350\256\257\347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\351\230\277\351\207\214\347\257\207.zip" "b/PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\351\230\277\351\207\214\347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\351\230\277\351\207\214\347\257\207.zip" rename to "PART_3_\345\244\247\345\216\202\351\235\242\350\257\225/\346\261\207\346\200\273/\351\230\277\351\207\214\347\257\207.zip" diff --git "a/\344\270\223\346\240\217/Linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" "b/PART_4_CS\347\237\245\350\257\206\346\261\207\346\200\273/Linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" similarity index 100% rename from "\344\270\223\346\240\217/Linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" rename to "PART_4_CS\347\237\245\350\257\206\346\261\207\346\200\273/Linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" diff --git a/README.md b/README.md index 8e8e66b0..3dfcf6b3 100644 --- a/README.md +++ b/README.md @@ -9,63 +9,64 @@ English version repo and Gitbook is on [english branch](https://github.com/geekx > Statr > > 目前共包括以下几个步骤: -> - 算法基础知识 -> - 高频面试题解(图解) -> - 算法视野扩展 +> - PART_1_算法基础 +> - PART_2_力扣图解 +> - PART_3_大厂面试 +> - PART_4_CS知识汇总 > -> [目前已支持 PDF 下载](https://www.geekxh.com/0.0.%E5%AD%A6%E4%B9%A0%E9%A1%BB%E7%9F%A5/03.html?3pVd) +> [目前已支持 PDF 下载](https://www.cxyhub.com/all/programming/7786/)
- +
-##### [点击下载本项目全部内容 提取码:【8f8b】 包括:1、我写的图解算法题典 2、千本开源电子书 3、百张思维导图 4、BAT/TMD 大厂面经 (如果链接失效,上方扫码回复即可)](https://www.geekxh.com/github_click.html?6072) +

+css +Statr +Statr +

+

+ 这也许是东半球最好的算法学习类项目! +

+
+ +> 我自己刷题都是在 lintcode 进行,也会在上面更新题解!下方可以直接进入~ +- [www.lintcode.com](https://www.lintcode.com/?utm_source=tf-github-xh2022) +- [另外推荐一套算法课,北大FB双料大佬的,我之前上过,性价比很高](https://www.jiuzhang.com/course/71/?utm_source=tf-github-xh2022) +- 最后,下方扫码可以领取我准备的刷题模板 +

+ +

- -#### 本项目还包括 I: - -> 千本开源电子书覆盖了你在IT行业发展可以用到的大部分资料,百张思维导图按照专题对各类计算机知识进行了整合。**由于文件过大,建议通过上方扫码,回复【999】获取** - -- 📚 [一千本开源电子书](https://github.com/geekxh/hello-algorithm/tree/master/%E6%B8%85%E6%99%B0%E7%89%88%E7%94%B5%E5%AD%90%E4%B9%A61000%E6%9C%AC) -- 🐒 [百张思维导图集锦](https://github.com/geekxh/hello-algorithm/tree/master/%E8%B6%85%E6%B8%85%E6%80%9D%E7%BB%B4%E5%AF%BC%E5%9B%BE100%E5%BC%A0) - -#### 本项目还包括 II: - -> 大厂面经汇总覆盖了阿里、京东、华为、字节、滴滴、百度、美团、腾讯 等公司的面试题,按照 公司/专题 两个维度对面试题进行了整合。**由于文件过大,建议通过上方扫码,回复【面经】获取** - -| 🚀 | 🚀 | 🚀 | 🚀 | 🚀 | 🚀 | -| :--- | :--- | :--- | :--- | :---| :--- | -| [阿里篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E9%98%BF%E9%87%8C%E7%AF%87.zip) | [京东篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E4%BA%AC%E4%B8%9C%E7%AF%87.zip) | [华为篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E5%8D%8E%E4%B8%BA%E7%AF%87.zip) | [字节篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E5%A4%B4%E6%9D%A1%E7%AF%87.zip) | [滴滴篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E6%BB%B4%E6%BB%B4%E7%AF%87.zip) | [百度篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E7%99%BE%E5%BA%A6%E7%AF%87.zip) | -| [百度篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E7%99%BE%E5%BA%A6%E7%AF%87.zip) | [美团篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E7%BE%8E%E5%9B%A2%E7%AF%87.zip) | [腾讯篇](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/%E8%85%BE%E8%AE%AF%E7%AF%87.zip) | [BAT汇总](https://github.com/geekxh/hello-algorithm/blob/master/%E5%A4%A7%E5%8E%82%E9%9D%A2%E7%BB%8F%E6%B1%87%E6%80%BB100%E7%AF%87/BAT%E9%9D%A2%E8%AF%95%E5%B8%B8%E9%97%AE80%E9%A2%98.zip) - -### 使用指南 - -1、因为本教程完全免费,但现在被一些不良商家拿去卖钱, 所以我需要你先帮我点一个 star ,助力原创,防止更多人上当受骗,也顺便支持我一下。 - -2、算法训练包括三部分:① 算法知识基础 ② 图解算法题典 ③ 算法知识扩展 - -3、如果是以面试为目的,可以直接对第二部分进行学习。如果基础薄弱,建议从第一部分进行学习。第三部分为专题学习,包含大部分算法资料。 - -4、对于其中题目有疑惑,可以加入我们的万人刷题群,群里可内推 BAT。扫下面这只熊,回复【进群】即可。 +### 正文 -
-
- -
-
+### PART_1_算法基础 -5、当然,也许你就想加我的私人微信: [个人名片](https://www.geekxh.com/contact.jpeg) +主要包括两部分: -PS:该项目包括了你在 IT 行业发展可以用到的绝大部分资料。但我希望大家不要当收藏党,找到适合自己的才重要。 +- a:数据结构知识框架:为了大家更好的掌握数据结构和算法,我把基础知识整理成了一张思维导图,包括下面这些知识点: -### 正文 +> [开始学习](PART_1_算法基础/README.md) -### PART I:算法知识基础 +- b:对常用的数据结构知识进行总结: +* [链表](PART_1_算法基础/2_基础知识/linked-list/README.md) +* [双向链表](PART_1_算法基础/2_基础知识/doubly-linked-list/README.md) +* [队列](PART_1_算法基础/2_基础知识/queue/README.md) +* [栈](PART_1_算法基础/2_基础知识/stack/README.md) +* [哈希表(散列)](PART_1_算法基础/2_基础知识/hash-table/README.md) +* [堆](PART_1_算法基础/2_基础知识/heap/README.md) +* [优先队列](PART_1_算法基础/2_基础知识/priority-queue/README.md) +* [字典树](PART_1_算法基础/2_基础知识/trie/README.md) +* [树](PART_1_算法基础/2_基础知识/tree/README.md) +* [图](PART_1_算法基础/2_基础知识/graph/README.md) +### PART_2_力扣图解 -### PART II:图解算法题典 +
显示更多
+ +> [小浩图解算法题典.PDF【完整版】下载](https://www.cxyhub.com/all/programming/7786/) - [开始学习](http://www.geekxh.com) - [阅读指南](http://www.geekxh.com/c99/hello.html) @@ -174,13 +175,27 @@ PS:该项目包括了你在 IT 行业发展可以用到的绝大部分资料 - [34.面试中的智力题](http://www.geekxh.com/1.99.其他补充题目/34.html) - [35.旋转图像(48)](http://www.geekxh.com/1.99.其他补充题目/51.html) -### PART III:算法视野扩展 +
+ +### PART_3_大厂面试(更新中) + +
显示更多
+ +考虑到现在网上面经实在太杂,很多都冠以 “BAT” 之名,重复率、错误率都非常高。所以我尽可能的挑选出了我认为比较好的 50 篇面经(基本不重复),并对内容做了分类。 + +建议大家把这个页面收藏起来,防止后面需要的时候找不到了。(整理了近40个小时,跪求star~) + +- [系统设计-长文(非常建议读,我自己也看了)](https://github.com/donnemartin/system-design-primer/blob/master/README-zh-Hans.md) +- [后端-社招(两年): 蚂蚁 头条 PingCAP](https://github.com/aylei/interview) +- [后端-京东-JAVA](https://www.cnblogs.com/wupeixuan/p/8908524.html#%E4%B8%80%E3%80%81java) +- [后端-百度-高并发抢红包设计](https://github.com/xbox1994/Java-Interview/blob/master/MD/%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1-%E9%AB%98%E5%B9%B6%E5%8F%91%E6%8A%A2%E7%BA%A2%E5%8C%85.md) +- [NLP(机器学习)-百度](https://www.e-learn.cn/topic/95743) + +
+ -| 🙉 | 🙉 | 🙉 | 🙉 | -| :--- | :--- | :--- | :--- | -| [Bresenham直线算法与画圆算法](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/Bresenham%E7%9B%B4%E7%BA%BF%E7%AE%97%E6%B3%95%E4%B8%8E%E7%94%BB%E5%9C%86%E7%AE%97%E6%B3%95.doc) | [C语言经典算法100例](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/C%E8%AF%AD%E8%A8%80%E7%BB%8F%E5%85%B8%E7%AE%97%E6%B3%95100%E4%BE%8B.doc) | [决策树和随机森林](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/%E5%86%B3%E7%AD%96%E6%A0%91%E5%92%8C%E9%9A%8F%E6%9C%BA%E6%A3%AE%E6%9E%97.zip) | [常用推荐算法](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/%E5%B8%B8%E7%94%A8%E6%8E%A8%E8%8D%90%E7%AE%97%E6%B3%95.pdf) | -| [微软面试100题系列](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/%E5%BE%AE%E8%BD%AF%E9%9D%A2%E8%AF%95100%E9%A2%98%E7%B3%BB%E5%88%97.zip) | [最小生成树算法讲解](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/%E6%9C%80%E5%B0%8F%E7%94%9F%E6%88%90%E6%A0%91%E7%AE%97%E6%B3%95%E8%AE%B2%E8%A7%A3.ppt) | [魔兽世界平衡算法](https://github.com/geekxh/hello-algorithm/blob/feature/1118/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/%E9%AD%94%E5%85%BD%E4%B8%96%E7%95%8C%E5%B9%B3%E8%A1%A1%E7%AE%97%E6%B3%95.zip) | [背包九讲](https://github.com/geekxh/hello-algorithm/blob/master/%E5%B0%8F%E6%B5%A9%E7%AE%97%E6%B3%95%E8%AE%AD%E7%BB%83/PART_3_%E7%AE%97%E6%B3%95%E8%A7%86%E9%87%8E%E6%89%A9%E5%B1%95/%E8%83%8C%E5%8C%85%E4%B9%9D%E8%AE%B2-2.0.zip) +### PART_4_CS_知识汇总(TODO) ### License -本项目除部分引用开源技术文档的内容外,大部分为本人原创!欢迎任何以学习为目的的传播,但未授权任何平台进行转载! +本项目除部分引用开源技术文档的内容外,大部分为本人原创。欢迎任何以学习为目的的传播,但未授权任何平台进行转载! diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/10.Python14\345\274\240\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" b/git similarity index 100% rename from "\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/10.Python14\345\274\240\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" rename to git diff --git a/hello-algorithm.iml b/hello-algorithm.iml new file mode 100644 index 00000000..47ffbb0a --- /dev/null +++ b/hello-algorithm.iml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" "b/other/designpattern/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" rename to "other/designpattern/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\344\272\253\345\205\203\346\250\241\345\274\217.md" "b/other/designpattern/\344\272\253\345\205\203\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\344\272\253\345\205\203\346\250\241\345\274\217.md" rename to "other/designpattern/\344\272\253\345\205\203\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\344\273\243\347\220\206\346\250\241\345\274\217.md" "b/other/designpattern/\344\273\243\347\220\206\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\344\273\243\347\220\206\346\250\241\345\274\217.md" rename to "other/designpattern/\344\273\243\347\220\206\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\215\225\344\276\213\346\250\241\345\274\217.md" "b/other/designpattern/\345\215\225\344\276\213\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\215\225\344\276\213\346\250\241\345\274\217.md" rename to "other/designpattern/\345\215\225\344\276\213\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\216\237\345\236\213\346\250\241\345\274\217.md" "b/other/designpattern/\345\216\237\345\236\213\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\216\237\345\236\213\346\250\241\345\274\217.md" rename to "other/designpattern/\345\216\237\345\236\213\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\221\275\344\273\244\346\250\241\345\274\217.md" "b/other/designpattern/\345\221\275\344\273\244\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\221\275\344\273\244\346\250\241\345\274\217.md" rename to "other/designpattern/\345\221\275\344\273\244\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" "b/other/designpattern/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" rename to "other/designpattern/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\226\350\247\202\346\250\241\345\274\217.md" "b/other/designpattern/\345\244\226\350\247\202\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\226\350\247\202\346\250\241\345\274\217.md" rename to "other/designpattern/\345\244\226\350\247\202\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\267\245\345\216\202\346\250\241\345\274\217.md" "b/other/designpattern/\345\267\245\345\216\202\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\267\245\345\216\202\346\250\241\345\274\217.md" rename to "other/designpattern/\345\267\245\345\216\202\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" "b/other/designpattern/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" rename to "other/designpattern/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\346\212\275\350\261\241\345\267\245\345\216\202.md" "b/other/designpattern/\346\212\275\350\261\241\345\267\245\345\216\202.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\346\212\275\350\261\241\345\267\245\345\216\202.md" rename to "other/designpattern/\346\212\275\350\261\241\345\267\245\345\216\202.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\346\241\245\346\216\245\346\250\241\345\274\217.md" "b/other/designpattern/\346\241\245\346\216\245\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\346\241\245\346\216\245\346\250\241\345\274\217.md" rename to "other/designpattern/\346\241\245\346\216\245\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\346\250\241\346\235\277\346\250\241\345\274\217.md" "b/other/designpattern/\346\250\241\346\235\277\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\346\250\241\346\235\277\346\250\241\345\274\217.md" rename to "other/designpattern/\346\250\241\346\235\277\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\212\266\346\200\201\346\250\241\345\274\217.md" "b/other/designpattern/\347\212\266\346\200\201\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\212\266\346\200\201\346\250\241\345\274\217.md" rename to "other/designpattern/\347\212\266\346\200\201\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" "b/other/designpattern/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" rename to "other/designpattern/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\255\226\347\225\245\346\250\241\345\274\217.md" "b/other/designpattern/\347\255\226\347\225\245\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\255\226\347\225\245\346\250\241\345\274\217.md" rename to "other/designpattern/\347\255\226\347\225\245\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" "b/other/designpattern/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" rename to "other/designpattern/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\273\204\345\220\210\346\250\241\345\274\217.md" "b/other/designpattern/\347\273\204\345\220\210\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\347\273\204\345\220\210\346\250\241\345\274\217.md" rename to "other/designpattern/\347\273\204\345\220\210\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" "b/other/designpattern/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" rename to "other/designpattern/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" "b/other/designpattern/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" rename to "other/designpattern/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" "b/other/designpattern/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" rename to "other/designpattern/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" "b/other/designpattern/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" rename to "other/designpattern/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" "b/other/designpattern/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" rename to "other/designpattern/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" "b/other/designpattern/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" rename to "other/designpattern/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" diff --git "a/\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" "b/other/designpattern/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\276\350\256\241\346\250\241\345\274\217/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" rename to "other/designpattern/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" diff --git "a/other/linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" "b/other/linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" new file mode 100644 index 00000000..1422a5a3 --- /dev/null +++ "b/other/linux/\344\270\200\346\226\207\350\257\273\346\207\202Linux.md" @@ -0,0 +1,1264 @@ + +* [前言](#前言) +* [一、常用操作以及概念](#一常用操作以及概念) + * [快捷键](#快捷键) + * [求助](#求助) + * [关机](#关机) + * [PATH](#path) + * [sudo](#sudo) + * [包管理工具](#包管理工具) + * [发行版](#发行版) + * [VIM 三个模式](#vim-三个模式) + * [GNU](#gnu) + * [开源协议](#开源协议) +* [二、磁盘](#二磁盘) + * [磁盘接口](#磁盘接口) + * [磁盘的文件名](#磁盘的文件名) +* [三、分区](#三分区) + * [分区表](#分区表) + * [开机检测程序](#开机检测程序) +* [四、文件系统](#四文件系统) + * [分区与文件系统](#分区与文件系统) + * [组成](#组成) + * [文件读取](#文件读取) + * [磁盘碎片](#磁盘碎片) + * [block](#block) + * [inode](#inode) + * [目录](#目录) + * [日志](#日志) + * [挂载](#挂载) + * [目录配置](#目录配置) +* [五、文件](#五文件) + * [文件属性](#文件属性) + * [文件与目录的基本操作](#文件与目录的基本操作) + * [修改权限](#修改权限) + * [默认权限](#默认权限) + * [目录的权限](#目录的权限) + * [链接](#链接) + * [获取文件内容](#获取文件内容) + * [指令与文件搜索](#指令与文件搜索) +* [六、压缩与打包](#六压缩与打包) + * [压缩文件名](#压缩文件名) + * [压缩指令](#压缩指令) + * [打包](#打包) +* [七、Bash](#七bash) + * [特性](#特性) + * [变量操作](#变量操作) + * [指令搜索顺序](#指令搜索顺序) + * [数据流重定向](#数据流重定向) +* [八、管道指令](#八管道指令) + * [提取指令](#提取指令) + * [排序指令](#排序指令) + * [双向输出重定向](#双向输出重定向) + * [字符转换指令](#字符转换指令) + * [分区指令](#分区指令) +* [九、正则表达式](#九正则表达式) + * [grep](#grep) + * [printf](#printf) + * [awk](#awk) +* [十、进程管理](#十进程管理) + * [查看进程](#查看进程) + * [进程状态](#进程状态) + * [SIGCHLD](#sigchld) + * [wait()](#wait) + * [waitpid()](#waitpid) + * [孤儿进程](#孤儿进程) + * [僵尸进程](#僵尸进程) +* [参考资料](#参考资料) + + + +# 前言 + +为了便于理解,本文从常用操作和概念开始讲起。虽然已经尽量做到简化,但是涉及到的内容还是有点多。在面试中,Linux 知识点相对于网络和操作系统等知识点而言不是那么重要,只需要重点掌握一些原理和命令即可。为了方便大家准备面试,在此先将一些比较重要的知识点列出来: + +- 能简单使用 cat,grep,cut 等命令进行一些操作; +- 文件系统相关的原理,inode 和 block 等概念,数据恢复; +- 硬链接与软链接; +- 进程管理相关,僵尸进程与孤儿进程,SIGCHLD 。 + +# 一、常用操作以及概念 + +## 快捷键 + +- Tab:命令和文件名补全; +- Ctrl+C:中断正在运行的程序; +- Ctrl+D:结束键盘输入(End Of File,EOF) + +## 求助 + +### 1. --help + +指令的基本用法与选项介绍。 + +### 2. man + +man 是 manual 的缩写,将指令的具体信息显示出来。 + +当执行 `man date` 时,有 DATE(1) 出现,其中的数字代表指令的类型,常用的数字及其类型如下: + +| 代号 | 类型 | +| :--: | -- | +| 1 | 用户在 shell 环境中可以操作的指令或者可执行文件 | +| 5 | 配置文件 | +| 8 | 系统管理员可以使用的管理指令 | + +### 3. info + +info 与 man 类似,但是 info 将文档分成一个个页面,每个页面可以跳转。 + +### 4. doc + +/usr/share/doc 存放着软件的一整套说明文件。 + +## 关机 + +### 1. who + +在关机前需要先使用 who 命令查看有没有其它用户在线。 + +### 2. sync + +为了加快对磁盘文件的读写速度,位于内存中的文件数据不会立即同步到磁盘,因此关机之前需要先进行 sync 同步操作。 + +### 3. shutdown + +```html +# shutdown [-krhc] 时间 [信息] +-k : 不会关机,只是发送警告信息,通知所有在线的用户 +-r : 将系统的服务停掉后就重新启动 +-h : 将系统的服务停掉后就立即关机 +-c : 取消已经在进行的 shutdown +``` + +## PATH + +可以在环境变量 PATH 中声明可执行文件的路径,路径之间用 : 分隔。 + +```html +/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/dmtsai/.local/bin:/home/dmtsai/bin +``` + +## sudo + +sudo 允许一般用户使用 root 可执行的命令,不过只有在 /etc/sudoers 配置文件中添加的用户才能使用该指令。 + +## 包管理工具 + +RPM 和 DPKG 为最常见的两类软件包管理工具: + +- RPM 全称为 Redhat Package Manager,最早由 Red Hat 公司制定实施,随后被 GNU 开源操作系统接受并成为许多 Linux 系统的既定软件标准。YUM 基于 RPM,具有依赖管理和软件升级功能。 +- 与 RPM 竞争的是基于 Debian 操作系统的 DEB 软件包管理工具 DPKG,全称为 Debian Package,功能方面与 RPM 相似。 + +## 发行版 + +Linux 发行版是 Linux 内核及各种应用软件的集成版本。 + +| 基于的包管理工具 | 商业发行版 | 社区发行版 | +| :--: | :--: | :--: | +| RPM | Red Hat | Fedora / CentOS | +| DPKG | Ubuntu | Debian | + +## VIM 三个模式 + +

+ + + +- 一般指令模式(Command mode):VIM 的默认模式,可以用于移动游标查看内容; +- 编辑模式(Insert mode):按下 "i" 等按键之后进入,可以对文本进行编辑; +- 指令列模式(Bottom-line mode):按下 ":" 按键之后进入,用于保存退出等操作。 + +在指令列模式下,有以下命令用于离开或者保存文件。 + +| 命令 | 作用 | +| :--: | :--: | +| :w | 写入磁盘| +| :w! | 当文件为只读时,强制写入磁盘。到底能不能写入,与用户对该文件的权限有关 | +| :q | 离开 | +| :q! | 强制离开不保存 | +| :wq | 写入磁盘后离开 | +| :wq!| 强制写入磁盘后离开 | + +## GNU + +GNU 计划,译为革奴计划,它的目标是创建一套完全自由的操作系统,称为 GNU,其内容软件完全以 GPL 方式发布。其中 GPL 全称为 GNU 通用公共许可协议(GNU General Public License),包含了以下内容: + +- 以任何目的运行此程序的自由; +- 再复制的自由; +- 改进此程序,并公开发布改进的自由。 + +## 开源协议 + +- [Choose an open source license](https://choosealicense.com/) +- [如何选择开源许可证?](http://www.ruanyifeng.com/blog/2011/05/how_to_choose_free_software_licenses.html) + +# 二、磁盘 + +## 磁盘接口 + +### 1. IDE + +IDE(ATA)全称 Advanced Technology Attachment,接口速度最大为 133MB/s,因为并口线的抗干扰性太差,且排线占用空间较大,不利电脑内部散热,已逐渐被 SATA 所取代。 + +

+ +### 2. SATA + +SATA 全称 Serial ATA,也就是使用串口的 ATA 接口,抗干扰性强,且对数据线的长度要求比 ATA 低很多,支持热插拔等功能。SATA-II 的接口速度为 300MB/s,而 SATA-III 标准可达到 600MB/s 的传输速度。SATA 的数据线也比 ATA 的细得多,有利于机箱内的空气流通,整理线材也比较方便。 + +

+ +### 3. SCSI + +SCSI 全称是 Small Computer System Interface(小型机系统接口),SCSI 硬盘广为工作站以及个人电脑以及服务器所使用,因此会使用较为先进的技术,如碟片转速 15000rpm 的高转速,且传输时 CPU 占用率较低,但是单价也比相同容量的 ATA 及 SATA 硬盘更加昂贵。 + +

+ +### 4. SAS + +SAS(Serial Attached SCSI)是新一代的 SCSI 技术,和 SATA 硬盘相同,都是采取序列式技术以获得更高的传输速度,可达到 6Gb/s。此外也通过缩小连接线改善系统内部空间等。 + +

+ +## 磁盘的文件名 + +Linux 中每个硬件都被当做一个文件,包括磁盘。磁盘以磁盘接口类型进行命名,常见磁盘的文件名如下: + +- IDE 磁盘:/dev/hd[a-d] +- SATA/SCSI/SAS 磁盘:/dev/sd[a-p] + +其中文件名后面的序号的确定与系统检测到磁盘的顺序有关,而与磁盘所插入的插槽位置无关。 + +# 三、分区 + +## 分区表 + +磁盘分区表主要有两种格式,一种是限制较多的 MBR 分区表,一种是较新且限制较少的 GPT 分区表。 + +### 1. MBR + +MBR 中,第一个扇区最重要,里面有主要开机记录(Master boot record, MBR)及分区表(partition table),其中主要开机记录占 446 bytes,分区表占 64 bytes。 + +分区表只有 64 bytes,最多只能存储 4 个分区,这 4 个分区为主分区(Primary)和扩展分区(Extended)。其中扩展分区只有一个,它使用其它扇区来记录额外的分区表,因此通过扩展分区可以分出更多分区,这些分区称为逻辑分区。 + +Linux 也把分区当成文件,分区文件的命名方式为:磁盘文件名 + 编号,例如 /dev/sda1。注意,逻辑分区的编号从 5 开始。 + +### 2. GPT + +扇区是磁盘的最小存储单位,旧磁盘的扇区大小通常为 512 bytes,而最新的磁盘支持 4 k。GPT 为了兼容所有磁盘,在定义扇区上使用逻辑区块地址(Logical Block Address, LBA),LBA 默认大小为 512 bytes。 + +GPT 第 1 个区块记录了主要开机记录(MBR),紧接着是 33 个区块记录分区信息,并把最后的 33 个区块用于对分区信息进行备份。这 33 个区块第一个为 GPT 表头纪录,这个部份纪录了分区表本身的位置与大小和备份分区的位置,同时放置了分区表的校验码 (CRC32),操作系统可以根据这个校验码来判断 GPT 是否正确。若有错误,可以使用备份分区进行恢复。 + +GPT 没有扩展分区概念,都是主分区,每个 LBA 可以分 4 个分区,因此总共可以分 4 * 32 = 128 个分区。 + +MBR 不支持 2.2 TB 以上的硬盘,GPT 则最多支持到 233 TB = 8 ZB。 + +

+ +## 开机检测程序 + +### 1. BIOS + +BIOS(Basic Input/Output System,基本输入输出系统),它是一个固件(嵌入在硬件中的软件),BIOS 程序存放在断电后内容不会丢失的只读内存中。 + +

+ +BIOS 是开机的时候计算机执行的第一个程序,这个程序知道可以开机的磁盘,并读取磁盘第一个扇区的主要开机记录(MBR),由主要开机记录(MBR)执行其中的开机管理程序,这个开机管理程序会加载操作系统的核心文件。 + +主要开机记录(MBR)中的开机管理程序提供以下功能:选单、载入核心文件以及转交其它开机管理程序。转交这个功能可以用来实现多重引导,只需要将另一个操作系统的开机管理程序安装在其它分区的启动扇区上,在启动开机管理程序时,就可以通过选单选择启动当前的操作系统或者转交给其它开机管理程序从而启动另一个操作系统。 + +下图中,第一扇区的主要开机记录(MBR)中的开机管理程序提供了两个选单:M1、M2,M1 指向了 Windows 操作系统,而 M2 指向其它分区的启动扇区,里面包含了另外一个开机管理程序,提供了一个指向 Linux 的选单。 + +

+ +安装多重引导,最好先安装 Windows 再安装 Linux。因为安装 Windows 时会覆盖掉主要开机记录(MBR),而 Linux 可以选择将开机管理程序安装在主要开机记录(MBR)或者其它分区的启动扇区,并且可以设置开机管理程序的选单。 + +### 2. UEFI + +BIOS 不可以读取 GPT 分区表,而 UEFI 可以。 + +# 四、文件系统 + +## 分区与文件系统 + +对分区进行格式化是为了在分区上建立文件系统。一个分区通常只能格式化为一个文件系统,但是磁盘阵列等技术可以将一个分区格式化为多个文件系统。 + +## 组成 + +最主要的几个组成部分如下: + +- inode:一个文件占用一个 inode,记录文件的属性,同时记录此文件的内容所在的 block 编号; +- block:记录文件的内容,文件太大时,会占用多个 block。 + +除此之外还包括: + +- superblock:记录文件系统的整体信息,包括 inode 和 block 的总量、使用量、剩余量,以及文件系统的格式与相关信息等; +- block bitmap:记录 block 是否被使用的位图。 + +

+ +## 文件读取 + +对于 Ext2 文件系统,当要读取一个文件的内容时,先在 inode 中查找文件内容所在的所有 block,然后把所有 block 的内容读出来。 + +

+ +而对于 FAT 文件系统,它没有 inode,每个 block 中存储着下一个 block 的编号。 + +

+ +## 磁盘碎片 + +指一个文件内容所在的 block 过于分散,导致磁盘磁头移动距离过大,从而降低磁盘读写性能。 + +## block + +在 Ext2 文件系统中所支持的 block 大小有 1K,2K 及 4K 三种,不同的大小限制了单个文件和文件系统的最大大小。 + +| 大小 | 1KB | 2KB | 4KB | +| :---: | :---: | :---: | :---: | +| 最大单一文件 | 16GB | 256GB | 2TB | +| 最大文件系统 | 2TB | 8TB | 16TB | + +一个 block 只能被一个文件所使用,未使用的部分直接浪费了。因此如果需要存储大量的小文件,那么最好选用比较小的 block。 + +## inode + +inode 具体包含以下信息: + +- 权限 (read/write/excute); +- 拥有者与群组 (owner/group); +- 容量; +- 建立或状态改变的时间 (ctime); +- 最近读取时间 (atime); +- 最近修改时间 (mtime); +- 定义文件特性的旗标 (flag),如 SetUID...; +- 该文件真正内容的指向 (pointer)。 + +inode 具有以下特点: + +- 每个 inode 大小均固定为 128 bytes (新的 ext4 与 xfs 可设定到 256 bytes); +- 每个文件都仅会占用一个 inode。 + +inode 中记录了文件内容所在的 block 编号,但是每个 block 非常小,一个大文件随便都需要几十万的 block。而一个 inode 大小有限,无法直接引用这么多 block 编号。因此引入了间接、双间接、三间接引用。间接引用让 inode 记录的引用 block 块记录引用信息。 + +

+ +## 目录 + +建立一个目录时,会分配一个 inode 与至少一个 block。block 记录的内容是目录下所有文件的 inode 编号以及文件名。 + +可以看到文件的 inode 本身不记录文件名,文件名记录在目录中,因此新增文件、删除文件、更改文件名这些操作与目录的写权限有关。 + +## 日志 + +如果突然断电,那么文件系统会发生错误,例如断电前只修改了 block bitmap,而还没有将数据真正写入 block 中。 + +ext3/ext4 文件系统引入了日志功能,可以利用日志来修复文件系统。 + +## 挂载 + +挂载利用目录作为文件系统的进入点,也就是说,进入目录之后就可以读取文件系统的数据。 + +## 目录配置 + +为了使不同 Linux 发行版本的目录结构保持一致性,Filesystem Hierarchy Standard (FHS) 规定了 Linux 的目录结构。最基础的三个目录如下: + +- / (root, 根目录) +- /usr (unix software resource):所有系统默认软件都会安装到这个目录; +- /var (variable):存放系统或程序运行过程中的数据文件。 + +

+ +# 五、文件 + +## 文件属性 + +用户分为三种:文件拥有者、群组以及其它人,对不同的用户有不同的文件权限。 + +使用 ls 查看一个文件时,会显示一个文件的信息,例如 `drwxr-xr-x 3 root root 17 May 6 00:14 .config`,对这个信息的解释如下: + +- drwxr-xr-x:文件类型以及权限,第 1 位为文件类型字段,后 9 位为文件权限字段 +- 3:链接数 +- root:文件拥有者 +- root:所属群组 +- 17:文件大小 +- May 6 00:14:文件最后被修改的时间 +- .config:文件名 + +常见的文件类型及其含义有: + +- d:目录 +- -:文件 +- l:链接文件 + +9 位的文件权限字段中,每 3 个为一组,共 3 组,每一组分别代表对文件拥有者、所属群组以及其它人的文件权限。一组权限中的 3 位分别为 r、w、x 权限,表示可读、可写、可执行。 + +文件时间有以下三种: + +- modification time (mtime):文件的内容更新就会更新; +- status time (ctime):文件的状态(权限、属性)更新就会更新; +- access time (atime):读取文件时就会更新。 + +## 文件与目录的基本操作 + +### 1. ls + +列出文件或者目录的信息,目录的信息就是其中包含的文件。 + +```html +# ls [-aAdfFhilnrRSt] file|dir +-a :列出全部的文件 +-d :仅列出目录本身 +-l :以长数据串行列出,包含文件的属性与权限等等数据 +``` + +### 2. cd + +更换当前目录。 + +``` +cd [相对路径或绝对路径] +``` + +### 3. mkdir + +创建目录。 + +``` +# mkdir [-mp] 目录名称 +-m :配置目录权限 +-p :递归创建目录 +``` + +### 4. rmdir + +删除目录,目录必须为空。 + +```html +rmdir [-p] 目录名称 +-p :递归删除目录 +``` + +### 5. touch + +更新文件时间或者建立新文件。 + +```html +# touch [-acdmt] filename +-a : 更新 atime +-c : 更新 ctime,若该文件不存在则不建立新文件 +-m : 更新 mtime +-d : 后面可以接更新日期而不使用当前日期,也可以使用 --date="日期或时间" +-t : 后面可以接更新时间而不使用当前时间,格式为[YYYYMMDDhhmm] +``` + +### 6. cp + +复制文件。如果源文件有两个以上,则目的文件一定要是目录才行。 + +```html +cp [-adfilprsu] source destination +-a :相当于 -dr --preserve=all +-d :若来源文件为链接文件,则复制链接文件属性而非文件本身 +-i :若目标文件已经存在时,在覆盖前会先询问 +-p :连同文件的属性一起复制过去 +-r :递归复制 +-u :destination 比 source 旧才更新 destination,或 destination 不存在的情况下才复制 +--preserve=all :除了 -p 的权限相关参数外,还加入 SELinux 的属性, links, xattr 等也复制了 +``` + +### 7. rm + +删除文件。 + +```html +# rm [-fir] 文件或目录 +-r :递归删除 +``` + +### 8. mv + +移动文件。 + +```html +# mv [-fiu] source destination +# mv [options] source1 source2 source3 .... directory +-f : force 强制的意思,如果目标文件已经存在,不会询问而直接覆盖 +``` + +## 修改权限 + +可以将一组权限用数字来表示,此时一组权限的 3 个位当做二进制数字的位,从左到右每个位的权值为 4、2、1,即每个权限对应的数字权值为 r : 4、w : 2、x : 1。 + +```html +# chmod [-R] xyz dirname/filename +``` + +示例:将 .bashrc 文件的权限修改为 -rwxr-xr--。 + +```html +# chmod 754 .bashrc +``` + +也可以使用符号来设定权限。 + +```html +# chmod [ugoa] [+-=] [rwx] dirname/filename +- u:拥有者 +- g:所属群组 +- o:其他人 +- a:所有人 +- +:添加权限 +- -:移除权限 +- =:设定权限 +``` + +示例:为 .bashrc 文件的所有用户添加写权限。 + +```html +# chmod a+w .bashrc +``` + +## 默认权限 + +- 文件默认权限:文件默认没有可执行权限,因此为 666,也就是 -rw-rw-rw- 。 +- 目录默认权限:目录必须要能够进入,也就是必须拥有可执行权限,因此为 777 ,也就是 drwxrwxrwx。 + +可以通过 umask 设置或者查看默认权限,通常以掩码的形式来表示,例如 002 表示其它用户的权限去除了一个 2 的权限,也就是写权限,因此建立新文件时默认的权限为 -rw-rw-r--。 + +## 目录的权限 + +文件名不是存储在一个文件的内容中,而是存储在一个文件所在的目录中。因此,拥有文件的 w 权限并不能对文件名进行修改。 + +目录存储文件列表,一个目录的权限也就是对其文件列表的权限。因此,目录的 r 权限表示可以读取文件列表;w 权限表示可以修改文件列表,具体来说,就是添加删除文件,对文件名进行修改;x 权限可以让该目录成为工作目录,x 权限是 r 和 w 权限的基础,如果不能使一个目录成为工作目录,也就没办法读取文件列表以及对文件列表进行修改了。 + +## 链接 + +

+ + +```html +# ln [-sf] source_filename dist_filename +-s :默认是实体链接,加 -s 为符号链接 +-f :如果目标文件存在时,先删除目标文件 +``` + +### 1. 实体链接 + +在目录下创建一个条目,记录着文件名与 inode 编号,这个 inode 就是源文件的 inode。 + +删除任意一个条目,文件还是存在,只要引用数量不为 0。 + +有以下限制:不能跨越文件系统、不能对目录进行链接。 + +```html +# ln /etc/crontab . +# ll -i /etc/crontab crontab +34474855 -rw-r--r--. 2 root root 451 Jun 10 2014 crontab +34474855 -rw-r--r--. 2 root root 451 Jun 10 2014 /etc/crontab +``` + +### 2. 符号链接 + +符号链接文件保存着源文件所在的绝对路径,在读取时会定位到源文件上,可以理解为 Windows 的快捷方式。 + +当源文件被删除了,链接文件就打不开了。 + +因为记录的是路径,所以可以为目录建立符号链接。 + +```html +# ll -i /etc/crontab /root/crontab2 +34474855 -rw-r--r--. 2 root root 451 Jun 10 2014 /etc/crontab +53745909 lrwxrwxrwx. 1 root root 12 Jun 23 22:31 /root/crontab2 -> /etc/crontab +``` + +## 获取文件内容 + +### 1. cat + +取得文件内容。 + +```html +# cat [-AbEnTv] filename +-n :打印出行号,连同空白行也会有行号,-b 不会 +``` + +### 2. tac + +是 cat 的反向操作,从最后一行开始打印。 + +### 3. more + +和 cat 不同的是它可以一页一页查看文件内容,比较适合大文件的查看。 + +### 4. less + +和 more 类似,但是多了一个向前翻页的功能。 + +### 5. head + +取得文件前几行。 + +```html +# head [-n number] filename +-n :后面接数字,代表显示几行的意思 +``` + +### 6. tail + +是 head 的反向操作,只是取得是后几行。 + +### 7. od + +以字符或者十六进制的形式显示二进制文件。 + +## 指令与文件搜索 + +### 1. which + +指令搜索。 + +```html +# which [-a] command +-a :将所有指令列出,而不是只列第一个 +``` + +### 2. whereis + +文件搜索。速度比较快,因为它只搜索几个特定的目录。 + +```html +# whereis [-bmsu] dirname/filename +``` + +### 3. locate + +文件搜索。可以用关键字或者正则表达式进行搜索。 + +locate 使用 /var/lib/mlocate/ 这个数据库来进行搜索,它存储在内存中,并且每天更新一次,所以无法用 locate 搜索新建的文件。可以使用 updatedb 来立即更新数据库。 + +```html +# locate [-ir] keyword +-r:正则表达式 +``` + +### 4. find + +文件搜索。可以使用文件的属性和权限进行搜索。 + +```html +# find [basedir] [option] +example: find . -name "shadow*" +``` + +**① 与时间有关的选项** + +```html +-mtime n :列出在 n 天前的那一天修改过内容的文件 +-mtime +n :列出在 n 天之前 (不含 n 天本身) 修改过内容的文件 +-mtime -n :列出在 n 天之内 (含 n 天本身) 修改过内容的文件 +-newer file : 列出比 file 更新的文件 +``` + ++4、4 和 -4 的指示的时间范围如下: + +

+ +**② 与文件拥有者和所属群组有关的选项** + +```html +-uid n +-gid n +-user name +-group name +-nouser :搜索拥有者不存在 /etc/passwd 的文件 +-nogroup:搜索所属群组不存在于 /etc/group 的文件 +``` + +**③ 与文件权限和名称有关的选项** + +```html +-name filename +-size [+-]SIZE:搜寻比 SIZE 还要大 (+) 或小 (-) 的文件。这个 SIZE 的规格有:c: 代表 byte,k: 代表 1024bytes。所以,要找比 50KB 还要大的文件,就是 -size +50k +-type TYPE +-perm mode :搜索权限等于 mode 的文件 +-perm -mode :搜索权限包含 mode 的文件 +-perm /mode :搜索权限包含任一 mode 的文件 +``` + +# 六、压缩与打包 + +## 压缩文件名 + +Linux 底下有很多压缩文件名,常见的如下: + +| 扩展名 | 压缩程序 | +| -- | -- | +| \*.Z | compress | +|\*.zip | zip | +|\*.gz | gzip| +|\*.bz2 | bzip2 | +|\*.xz | xz | +|\*.tar | tar 程序打包的数据,没有经过压缩 | +|\*.tar.gz | tar 程序打包的文件,经过 gzip 的压缩 | +|\*.tar.bz2 | tar 程序打包的文件,经过 bzip2 的压缩 | +|\*.tar.xz | tar 程序打包的文件,经过 xz 的压缩 | + +## 压缩指令 + +### 1. gzip + +gzip 是 Linux 使用最广的压缩指令,可以解开 compress、zip 与 gzip 所压缩的文件。 + +经过 gzip 压缩过,源文件就不存在了。 + +有 9 个不同的压缩等级可以使用。 + +可以使用 zcat、zmore、zless 来读取压缩文件的内容。 + +```html +$ gzip [-cdtv#] filename +-c :将压缩的数据输出到屏幕上 +-d :解压缩 +-t :检验压缩文件是否出错 +-v :显示压缩比等信息 +-# : # 为数字的意思,代表压缩等级,数字越大压缩比越高,默认为 6 +``` + +### 2. bzip2 + +提供比 gzip 更高的压缩比。 + +查看命令:bzcat、bzmore、bzless、bzgrep。 + +```html +$ bzip2 [-cdkzv#] filename +-k :保留源文件 +``` + +### 3. xz + +提供比 bzip2 更佳的压缩比。 + +可以看到,gzip、bzip2、xz 的压缩比不断优化。不过要注意的是,压缩比越高,压缩的时间也越长。 + +查看命令:xzcat、xzmore、xzless、xzgrep。 + +```html +$ xz [-dtlkc#] filename +``` + +## 打包 + +压缩指令只能对一个文件进行压缩,而打包能够将多个文件打包成一个大文件。tar 不仅可以用于打包,也可以使用 gzip、bzip2、xz 将打包文件进行压缩。 + +```html +$ tar [-z|-j|-J] [cv] [-f 新建的 tar 文件] filename... ==打包压缩 +$ tar [-z|-j|-J] [tv] [-f 已有的 tar 文件] ==查看 +$ tar [-z|-j|-J] [xv] [-f 已有的 tar 文件] [-C 目录] ==解压缩 +-z :使用 zip; +-j :使用 bzip2; +-J :使用 xz; +-c :新建打包文件; +-t :查看打包文件里面有哪些文件; +-x :解打包或解压缩的功能; +-v :在压缩/解压缩的过程中,显示正在处理的文件名; +-f : filename:要处理的文件; +-C 目录 : 在特定目录解压缩。 +``` + +| 使用方式 | 命令 | +| :---: | --- | +| 打包压缩 | tar -jcv -f filename.tar.bz2 要被压缩的文件或目录名称 | +| 查 看 | tar -jtv -f filename.tar.bz2 | +| 解压缩 | tar -jxv -f filename.tar.bz2 -C 要解压缩的目录 | + +# 七、Bash + +可以通过 Shell 请求内核提供服务,Bash 正是 Shell 的一种。 + +## 特性 + +- 命令历史:记录使用过的命令 +- 命令与文件补全:快捷键:tab +- 命名别名:例如 ll 是 ls -al 的别名 +- shell scripts +- 通配符:例如 ls -l /usr/bin/X\* 列出 /usr/bin 下面所有以 X 开头的文件 + +## 变量操作 + +对一个变量赋值直接使用 =。 + +对变量取用需要在变量前加上 \$ ,也可以用 \${} 的形式; + +输出变量使用 echo 命令。 + +```bash +$ x=abc +$ echo $x +$ echo ${x} +``` + +变量内容如果有空格,必须使用双引号或者单引号。 + +- 双引号内的特殊字符可以保留原本特性,例如 x="lang is \$LANG",则 x 的值为 lang is zh_TW.UTF-8; +- 单引号内的特殊字符就是特殊字符本身,例如 x='lang is \$LANG',则 x 的值为 lang is \$LANG。 + +可以使用 \`指令\` 或者 \$(指令) 的方式将指令的执行结果赋值给变量。例如 version=\$(uname -r),则 version 的值为 4.15.0-22-generic。 + +可以使用 export 命令将自定义变量转成环境变量,环境变量可以在子程序中使用,所谓子程序就是由当前 Bash 而产生的子 Bash。 + +Bash 的变量可以声明为数组和整数数字。注意数字类型没有浮点数。如果不进行声明,默认是字符串类型。变量的声明使用 declare 命令: + +```html +$ declare [-aixr] variable +-a : 定义为数组类型 +-i : 定义为整数类型 +-x : 定义为环境变量 +-r : 定义为 readonly 类型 +``` + +使用 [ ] 来对数组进行索引操作: + +```bash +$ array[1]=a +$ array[2]=b +$ echo ${array[1]} +``` + +## 指令搜索顺序 + +- 以绝对或相对路径来执行指令,例如 /bin/ls 或者 ./ls ; +- 由别名找到该指令来执行; +- 由 Bash 内置的指令来执行; +- 按 \$PATH 变量指定的搜索路径的顺序找到第一个指令来执行。 + +## 数据流重定向 + +重定向指的是使用文件代替标准输入、标准输出和标准错误输出。 + +| 1 | 代码 | 运算符 | +| :---: | :---: | :---:| +| 标准输入 (stdin) | 0 | < 或 << | +| 标准输出 (stdout) | 1 | > 或 >> | +| 标准错误输出 (stderr) | 2 | 2> 或 2>> | + +其中,有一个箭头的表示以覆盖的方式重定向,而有两个箭头的表示以追加的方式重定向。 + +可以将不需要的标准输出以及标准错误输出重定向到 /dev/null,相当于扔进垃圾箱。 + +如果需要将标准输出以及标准错误输出同时重定向到一个文件,需要将某个输出转换为另一个输出,例如 2>&1 表示将标准错误输出转换为标准输出。 + +```bash +$ find /home -name .bashrc > list 2>&1 +``` + +# 八、管道指令 + +管道是将一个命令的标准输出作为另一个命令的标准输入,在数据需要经过多个步骤的处理之后才能得到我们想要的内容时就可以使用管道。 + +在命令之间使用 | 分隔各个管道命令。 + +```bash +$ ls -al /etc | less +``` + +## 提取指令 + +cut 对数据进行切分,取出想要的部分。 + +切分过程一行一行地进行。 + +```html +$ cut +-d :分隔符 +-f :经过 -d 分隔后,使用 -f n 取出第 n 个区间 +-c :以字符为单位取出区间 +``` + +示例 1:last 显示登入者的信息,取出用户名。 + +```html +$ last +root pts/1 192.168.201.101 Sat Feb 7 12:35 still logged in +root pts/1 192.168.201.101 Fri Feb 6 12:13 - 18:46 (06:33) +root pts/1 192.168.201.254 Thu Feb 5 22:37 - 23:53 (01:16) + +$ last | cut -d ' ' -f 1 +``` + +示例 2:将 export 输出的信息,取出第 12 字符以后的所有字符串。 + +```html +$ export +declare -x HISTCONTROL="ignoredups" +declare -x HISTSIZE="1000" +declare -x HOME="/home/dmtsai" +declare -x HOSTNAME="study.centos.vbird" +.....(其他省略)..... + +$ export | cut -c 12- +``` + +## 排序指令 + +**sort** 用于排序。 + +```html +$ sort [-fbMnrtuk] [file or stdin] +-f :忽略大小写 +-b :忽略最前面的空格 +-M :以月份的名字来排序,例如 JAN,DEC +-n :使用数字 +-r :反向排序 +-u :相当于 unique,重复的内容只出现一次 +-t :分隔符,默认为 tab +-k :指定排序的区间 +``` + +示例:/etc/passwd 文件内容以 : 来分隔,要求以第三列进行排序。 + +```html +$ cat /etc/passwd | sort -t ':' -k 3 +root:x:0:0:root:/root:/bin/bash +dmtsai:x:1000:1000:dmtsai:/home/dmtsai:/bin/bash +alex:x:1001:1002::/home/alex:/bin/bash +arod:x:1002:1003::/home/arod:/bin/bash +``` + +**uniq** 可以将重复的数据只取一个。 + +```html +$ uniq [-ic] +-i :忽略大小写 +-c :进行计数 +``` + +示例:取得每个人的登录总次数 + +```html +$ last | cut -d ' ' -f 1 | sort | uniq -c +1 +6 (unknown +47 dmtsai +4 reboot +7 root +1 wtmp +``` + +## 双向输出重定向 + +输出重定向会将输出内容重定向到文件中,而 **tee** 不仅能够完成这个功能,还能保留屏幕上的输出。也就是说,使用 tee 指令,一个输出会同时传送到文件和屏幕上。 + +```html +$ tee [-a] file +``` + +## 字符转换指令 + +**tr** 用来删除一行中的字符,或者对字符进行替换。 + +```html +$ tr [-ds] SET1 ... +-d : 删除行中 SET1 这个字符串 +``` + +示例,将 last 输出的信息所有小写转换为大写。 + +```html +$ last | tr '[a-z]' '[A-Z]' +``` + + **col** 将 tab 字符转为空格字符。 + +```html +$ col [-xb] +-x : 将 tab 键转换成对等的空格键 +``` + +**expand** 将 tab 转换一定数量的空格,默认是 8 个。 + +```html +$ expand [-t] file +-t :tab 转为空格的数量 +``` + +**join** 将有相同数据的那一行合并在一起。 + +```html +$ join [-ti12] file1 file2 +-t :分隔符,默认为空格 +-i :忽略大小写的差异 +-1 :第一个文件所用的比较字段 +-2 :第二个文件所用的比较字段 +``` + +**paste** 直接将两行粘贴在一起。 + +```html +$ paste [-d] file1 file2 +-d :分隔符,默认为 tab +``` + +## 分区指令 + +**split** 将一个文件划分成多个文件。 + +```html +$ split [-bl] file PREFIX +-b :以大小来进行分区,可加单位,例如 b, k, m 等 +-l :以行数来进行分区。 +- PREFIX :分区文件的前导名称 +``` + +# 九、正则表达式 + +## grep + +g/re/p(globally search a regular expression and print),使用正则表示式进行全局查找并打印。 + +```html +$ grep [-acinv] [--color=auto] 搜寻字符串 filename +-c : 统计匹配到行的个数 +-i : 忽略大小写 +-n : 输出行号 +-v : 反向选择,也就是显示出没有 搜寻字符串 内容的那一行 +--color=auto :找到的关键字加颜色显示 +``` + +示例:把含有 the 字符串的行提取出来(注意默认会有 --color=auto 选项,因此以下内容在 Linux 中有颜色显示 the 字符串) + +```html +$ grep -n 'the' regular_express.txt +8:I can't finish the test. +12:the symbol '*' is represented as start. +15:You are the best is mean you are the no. 1. +16:The world Happy is the same with "glad". +18:google is the best tools for search keyword +``` + +示例:正则表达式 a{m,n} 用来匹配字符 a m\~n 次,这里需要将 { 和 } 进行转义,因为它们在 shell 是有特殊意义的。 + +```html +$ grep -n 'a\{2,5\}' regular_express.txt +``` + +## printf + +用于格式化输出。它不属于管道命令,在给 printf 传数据时需要使用 $( ) 形式。 + +```html +$ printf '%10s %5i %5i %5i %8.2f \n' $(cat printf.txt) + DmTsai 80 60 92 77.33 + VBird 75 55 80 70.00 + Ken 60 90 70 73.33 +``` + +## awk + +是由 Alfred Aho,Peter Weinberger 和 Brian Kernighan 创造,awk 这个名字就是这三个创始人名字的首字母。 + +awk 每次处理一行,处理的最小单位是字段,每个字段的命名方式为:\$n,n 为字段号,从 1 开始,\$0 表示一整行。 + +示例:取出最近五个登录用户的用户名和 IP。首先用 last -n 5 取出用最近五个登录用户的所有信息,可以看到用户名和 IP 分别在第 1 列和第 3 列,我们用 \$1 和 \$3 就能取出这两个字段,然后用 print 进行打印。 + +```html +$ last -n 5 +dmtsai pts/0 192.168.1.100 Tue Jul 14 17:32 still logged in +dmtsai pts/0 192.168.1.100 Thu Jul 9 23:36 - 02:58 (03:22) +dmtsai pts/0 192.168.1.100 Thu Jul 9 17:23 - 23:36 (06:12) +dmtsai pts/0 192.168.1.100 Thu Jul 9 08:02 - 08:17 (00:14) +dmtsai tty1 Fri May 29 11:55 - 12:11 (00:15) +``` + +```html +$ last -n 5 | awk '{print $1 "\t" $3}' +``` + +可以根据字段的某些条件进行匹配,例如匹配字段小于某个值的那一行数据。 + +```html +$ awk '条件类型 1 {动作 1} 条件类型 2 {动作 2} ...' filename +``` + +示例:/etc/passwd 文件第三个字段为 UID,对 UID 小于 10 的数据进行处理。 + +```text +$ cat /etc/passwd | awk 'BEGIN {FS=":"} $3 < 10 {print $1 "\t " $3}' +root 0 +bin 1 +daemon 2 +``` + +awk 变量: + +| 变量名称 | 代表意义 | +| :--: | -- | +| NF | 每一行拥有的字段总数 | +| NR | 目前所处理的是第几行数据 | +| FS | 目前的分隔字符,默认是空格键 | + +示例:显示正在处理的行号以及每一行有多少字段 + +```html +$ last -n 5 | awk '{print $1 "\t lines: " NR "\t columns: " NF}' +dmtsai lines: 1 columns: 10 +dmtsai lines: 2 columns: 10 +dmtsai lines: 3 columns: 10 +dmtsai lines: 4 columns: 10 +dmtsai lines: 5 columns: 9 +``` + +# 十、进程管理 + +## 查看进程 + +### 1. ps + +查看某个时间点的进程信息。 + +示例:查看自己的进程 + +```sh +# ps -l +``` + +示例:查看系统所有进程 + +```sh +# ps aux +``` + +示例:查看特定的进程 + +```sh +# ps aux | grep threadx +``` + +### 2. pstree + +查看进程树。 + +示例:查看所有进程树 + +```sh +# pstree -A +``` + +### 3. top + +实时显示进程信息。 + +示例:两秒钟刷新一次 + +```sh +# top -d 2 +``` + +### 4. netstat + +查看占用端口的进程 + +示例:查看特定端口的进程 + +```sh +# netstat -anp | grep port +``` + +## 进程状态 + +| 状态 | 说明 | +| :---: | --- | +| R | running or runnable (on run queue)
正在执行或者可执行,此时进程位于执行队列中。| +| D | uninterruptible sleep (usually I/O)
不可中断阻塞,通常为 IO 阻塞。 | +| S | interruptible sleep (waiting for an event to complete)
可中断阻塞,此时进程正在等待某个事件完成。| +| Z | zombie (terminated but not reaped by its parent)
僵死,进程已经终止但是尚未被其父进程获取信息。| +| T | stopped (either by a job control signal or because it is being traced)
结束,进程既可以被作业控制信号结束,也可能是正在被追踪。| +
+ +

+ +## SIGCHLD + +当一个子进程改变了它的状态时(停止运行,继续运行或者退出),有两件事会发生在父进程中: + +- 得到 SIGCHLD 信号; +- waitpid() 或者 wait() 调用会返回。 + +其中子进程发送的 SIGCHLD 信号包含了子进程的信息,比如进程 ID、进程状态、进程使用 CPU 的时间等。 + +在子进程退出时,它的进程描述符不会立即释放,这是为了让父进程得到子进程信息,父进程通过 wait() 和 waitpid() 来获得一个已经退出的子进程的信息。 + +

+ +## wait() + +```c +pid_t wait(int *status) +``` + +父进程调用 wait() 会一直阻塞,直到收到一个子进程退出的 SIGCHLD 信号,之后 wait() 函数会销毁子进程并返回。 + +如果成功,返回被收集的子进程的进程 ID;如果调用进程没有子进程,调用就会失败,此时返回 -1,同时 errno 被置为 ECHILD。 + +参数 status 用来保存被收集的子进程退出时的一些状态,如果对这个子进程是如何死掉的毫不在意,只想把这个子进程消灭掉,可以设置这个参数为 NULL。 + +## waitpid() + +```c +pid_t waitpid(pid_t pid, int *status, int options) +``` + +作用和 wait() 完全相同,但是多了两个可由用户控制的参数 pid 和 options。 + +pid 参数指示一个子进程的 ID,表示只关心这个子进程退出的 SIGCHLD 信号。如果 pid=-1 时,那么和 wait() 作用相同,都是关心所有子进程退出的 SIGCHLD 信号。 + +options 参数主要有 WNOHANG 和 WUNTRACED 两个选项,WNOHANG 可以使 waitpid() 调用变成非阻塞的,也就是说它会立即返回,父进程可以继续执行其它任务。 + +## 孤儿进程 + +一个父进程退出,而它的一个或多个子进程还在运行,那么这些子进程将成为孤儿进程。 + +孤儿进程将被 init 进程(进程号为 1)所收养,并由 init 进程对它们完成状态收集工作。 + +由于孤儿进程会被 init 进程收养,所以孤儿进程不会对系统造成危害。 + +## 僵尸进程 + +一个子进程的进程描述符在子进程退出时不会释放,只有当父进程通过 wait() 或 waitpid() 获取了子进程信息后才会释放。如果子进程退出,而父进程并没有调用 wait() 或 waitpid(),那么子进程的进程描述符仍然保存在系统中,这种进程称之为僵尸进程。 + +僵尸进程通过 ps 命令显示出来的状态为 Z(zombie)。 + +系统所能使用的进程号是有限的,如果产生大量僵尸进程,将因为没有可用的进程号而导致系统不能产生新的进程。 + +要消灭系统中大量的僵尸进程,只需要将其父进程杀死,此时僵尸进程就会变成孤儿进程,从而被 init 进程所收养,这样 init 进程就会释放所有的僵尸进程所占有的资源,从而结束僵尸进程。 + +# 参考资料 + +- 鸟哥. 鸟 哥 的 Linux 私 房 菜 基 础 篇 第 三 版[J]. 2009. +- [Linux 平台上的软件包管理](https://www.ibm.com/developerworks/cn/linux/l-cn-rpmdpkg/index.html) +- [Linux 之守护进程、僵死进程与孤儿进程](http://liubigbin.github.io/2016/03/11/Linux-%E4%B9%8B%E5%AE%88%E6%8A%A4%E8%BF%9B%E7%A8%8B%E3%80%81%E5%83%B5%E6%AD%BB%E8%BF%9B%E7%A8%8B%E4%B8%8E%E5%AD%A4%E5%84%BF%E8%BF%9B%E7%A8%8B/) +- [What is the difference between a symbolic link and a hard link?](https://stackoverflow.com/questions/185899/what-is-the-difference-between-a-symbolic-link-and-a-hard-link) +- [Linux process states](https://idea.popcount.org/2012-12-11-linux-process-states/) +- [GUID Partition Table](https://en.wikipedia.org/wiki/GUID_Partition_Table) +- [详解 wait 和 waitpid 函数](https://blog.csdn.net/kevinhg/article/details/7001719) +- [IDE、SATA、SCSI、SAS、FC、SSD 硬盘类型介绍](https://blog.csdn.net/tianlesoftware/article/details/6009110) +- [Akai IB-301S SCSI Interface for S2800,S3000](http://www.mpchunter.com/s3000/akai-ib-301s-scsi-interface-for-s2800s3000/) +- [Parallel ATA](https://en.wikipedia.org/wiki/Parallel_ATA) +- [ADATA XPG SX900 256GB SATA 3 SSD Review – Expanded Capacity and SandForce Driven Speed](http://www.thessdreview.com/our-reviews/adata-xpg-sx900-256gb-sata-3-ssd-review-expanded-capacity-and-sandforce-driven-speed/4/) +- [Decoding UCS Invicta – Part 1](https://blogs.cisco.com/datacenter/decoding-ucs-invicta-part-1) +- [硬盘](https://zh.wikipedia.org/wiki/%E7%A1%AC%E7%9B%98) +- [Difference between SAS and SATA](http://www.differencebetween.info/difference-between-sas-and-sata) +- [BIOS](https://zh.wikipedia.org/wiki/BIOS) +- [File system design case studies](https://www.cs.rutgers.edu/\~pxk/416/notes/13-fs-studies.html) +- [Programming Project #4](https://classes.soe.ucsc.edu/cmps111/Fall08/proj4.shtml) +- [FILE SYSTEM DESIGN](http://web.cs.ucla.edu/classes/fall14/cs111/scribe/11a/index.html) + + + + + + + diff --git "a/\344\270\223\346\240\217/Mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" "b/other/mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" similarity index 100% rename from "\344\270\223\346\240\217/Mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" rename to "other/mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" diff --git "a/\344\270\223\346\240\217/Mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" "b/other/mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" similarity index 100% rename from "\344\270\223\346\240\217/Mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" rename to "other/mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" diff --git "a/\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" "b/other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" rename to "other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" diff --git "a/\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" "b/other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" rename to "other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" diff --git "a/\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" "b/other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" rename to "other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" diff --git "a/\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" "b/other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" rename to "other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" diff --git "a/\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" "b/other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" rename to "other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" diff --git "a/\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" "b/other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" similarity index 100% rename from "\344\270\223\346\240\217/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" rename to "other/netword/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" diff --git "a/\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\345\206\205\345\255\230\347\256\241\347\220\206.md" "b/other/os/\345\206\205\345\255\230\347\256\241\347\220\206.md" similarity index 100% rename from "\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\345\206\205\345\255\230\347\256\241\347\220\206.md" rename to "other/os/\345\206\205\345\255\230\347\256\241\347\220\206.md" diff --git "a/\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\346\255\273\351\224\201.md" "b/other/os/\346\255\273\351\224\201.md" similarity index 100% rename from "\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\346\255\273\351\224\201.md" rename to "other/os/\346\255\273\351\224\201.md" diff --git "a/\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\347\243\201\347\233\230\350\260\203\345\272\246.md" "b/other/os/\347\243\201\347\233\230\350\260\203\345\272\246.md" similarity index 100% rename from "\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\347\243\201\347\233\230\350\260\203\345\272\246.md" rename to "other/os/\347\243\201\347\233\230\350\260\203\345\272\246.md" diff --git "a/\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\350\277\233\347\250\213\347\256\241\347\220\206.md" "b/other/os/\350\277\233\347\250\213\347\256\241\347\220\206.md" similarity index 100% rename from "\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\350\277\233\347\250\213\347\256\241\347\220\206.md" rename to "other/os/\350\277\233\347\250\213\347\256\241\347\220\206.md" diff --git "a/\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" "b/other/os/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" similarity index 100% rename from "\344\270\223\346\240\217/\346\223\215\344\275\234\347\263\273\347\273\237/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" rename to "other/os/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" diff --git a/website/README.md b/website/README.md deleted file mode 100644 index 5dec6833..00000000 --- a/website/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### 通告 - -小浩算法网站源码已做迁移。 \ No newline at end of file diff --git "a/\346\270\205\346\231\260\347\211\210\347\224\265\345\255\220\344\271\2461000\346\234\254/README.md" "b/\345\215\203\346\234\254\345\274\200\346\272\220\347\224\265\345\255\220\344\271\246/README.md" similarity index 100% rename from "\346\270\205\346\231\260\347\211\210\347\224\265\345\255\220\344\271\2461000\346\234\254/README.md" rename to "\345\215\203\346\234\254\345\274\200\346\272\220\347\224\265\345\255\220\344\271\246/README.md" diff --git "a/\346\270\205\346\231\260\347\211\210\347\224\265\345\255\220\344\271\2461000\346\234\254/book_1000.png" "b/\345\215\203\346\234\254\345\274\200\346\272\220\347\224\265\345\255\220\344\271\246/book_1000.png" similarity index 100% rename from "\346\270\205\346\231\260\347\211\210\347\224\265\345\255\220\344\271\2461000\346\234\254/book_1000.png" rename to "\345\215\203\346\234\254\345\274\200\346\272\220\347\224\265\345\255\220\344\271\246/book_1000.png" diff --git "a/\346\270\205\346\231\260\347\211\210\347\224\265\345\255\220\344\271\2461000\346\234\254/python_100.md" "b/\345\215\203\346\234\254\345\274\200\346\272\220\347\224\265\345\255\220\344\271\246/python_100.md" similarity index 100% rename from "\346\270\205\346\231\260\347\211\210\347\224\265\345\255\220\344\271\2461000\346\234\254/python_100.md" rename to "\345\215\203\346\234\254\345\274\200\346\272\220\347\224\265\345\255\220\344\271\246/python_100.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200\347\237\245\350\257\206/README.md" "b/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200\347\237\245\350\257\206/README.md" deleted file mode 100644 index 05c850fb..00000000 --- "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_1_\347\256\227\346\263\225\345\237\272\347\241\200\347\237\245\350\257\206/README.md" +++ /dev/null @@ -1,12 +0,0 @@ -> ### **小浩算法是一套针对小白的完整的算法训练流程!** -> -> css -> Statr -> Statr -> -> 目前共包括以下几个步骤: -> - 算法基础知识 -> - 算法图解题典 -> - 算法视野扩展 - -## PART I 算法基础知识 \ No newline at end of file diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/13.Java\345\237\272\347\241\20014\345\274\240\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\347\231\276\345\274\240\346\200\235\347\273\264\345\257\274\345\233\276/README.md" similarity index 100% rename from "\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/13.Java\345\237\272\347\241\20014\345\274\240\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" rename to "\347\231\276\345\274\240\346\200\235\347\273\264\345\257\274\345\233\276/README.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/Bresenham\347\233\264\347\272\277\347\256\227\346\263\225\344\270\216\347\224\273\345\234\206\347\256\227\346\263\225.doc" "b/\347\256\227\346\263\225\350\257\273\347\211\251/Bresenham\347\233\264\347\272\277\347\256\227\346\263\225\344\270\216\347\224\273\345\234\206\347\256\227\346\263\225.doc" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/Bresenham\347\233\264\347\272\277\347\256\227\346\263\225\344\270\216\347\224\273\345\234\206\347\256\227\346\263\225.doc" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/Bresenham\347\233\264\347\272\277\347\256\227\346\263\225\344\270\216\347\224\273\345\234\206\347\256\227\346\263\225.doc" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/C\350\257\255\350\250\200\347\273\217\345\205\270\347\256\227\346\263\225100\344\276\213.doc" "b/\347\256\227\346\263\225\350\257\273\347\211\251/C\350\257\255\350\250\200\347\273\217\345\205\270\347\256\227\346\263\225100\344\276\213.doc" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/C\350\257\255\350\250\200\347\273\217\345\205\270\347\256\227\346\263\225100\344\276\213.doc" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/C\350\257\255\350\250\200\347\273\217\345\205\270\347\256\227\346\263\225100\344\276\213.doc" diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/Mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" "b/\347\256\227\346\263\225\350\257\273\347\211\251/Mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" new file mode 100644 index 00000000..4072be60 Binary files /dev/null and "b/\347\256\227\346\263\225\350\257\273\347\211\251/Mysql/21\345\210\206\351\222\237Mysql\345\210\235\345\255\246\350\200\205\346\225\231\347\250\213.docx" differ diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/Mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" "b/\347\256\227\346\263\225\350\257\273\347\211\251/Mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" new file mode 100644 index 00000000..64d28c89 Binary files /dev/null and "b/\347\256\227\346\263\225\350\257\273\347\211\251/Mysql/MySQL\347\264\242\345\274\225\350\203\214\345\220\216\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204\345\217\212\347\256\227\346\263\225\345\216\237\347\220\206.pdf" differ diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/README.md" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/README.md" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\345\206\263\347\255\226\346\240\221\345\222\214\351\232\217\346\234\272\346\243\256\346\236\227.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\206\263\347\255\226\346\240\221\345\222\214\351\232\217\346\234\272\346\243\256\346\236\227.zip" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\345\206\263\347\255\226\346\240\221\345\222\214\351\232\217\346\234\272\346\243\256\346\236\227.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\206\263\347\255\226\346\240\221\345\222\214\351\232\217\346\234\272\346\243\256\346\236\227.zip" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_01_DuplicationInArray/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_01_DuplicationInArray/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_01_DuplicationInArray/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_01_DuplicationInArray/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_01_DuplicationInArray/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_01_DuplicationInArray/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_01_DuplicationInArray/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_01_DuplicationInArray/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/03_02_DuplicationInArrayNoEdit/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/04_FindInPartiallySortedMatrix/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/05_ReplaceSpaces/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/05_ReplaceSpaces/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/05_ReplaceSpaces/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/05_ReplaceSpaces/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/05_ReplaceSpaces/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/05_ReplaceSpaces/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/05_ReplaceSpaces/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/05_ReplaceSpaces/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/06_PrintListInReversedOrder/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/07_ConstructBinaryTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/07_ConstructBinaryTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/07_ConstructBinaryTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/07_ConstructBinaryTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/07_ConstructBinaryTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/07_ConstructBinaryTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/07_ConstructBinaryTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/07_ConstructBinaryTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/08_NextNodeInBinaryTrees/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_01_QueueWithTwoStacks/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/09_02_StackWithTwoQueues/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_01_Fibonacci/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_01_Fibonacci/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_01_Fibonacci/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_01_Fibonacci/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_01_Fibonacci/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_01_Fibonacci/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_01_Fibonacci/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_01_Fibonacci/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_02_JumpFloor/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_02_JumpFloor/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_02_JumpFloor/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_02_JumpFloor/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_02_JumpFloor/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_02_JumpFloor/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_02_JumpFloor/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_02_JumpFloor/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_03_JumpFloorII/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_03_JumpFloorII/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_03_JumpFloorII/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_03_JumpFloorII/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_03_JumpFloorII/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_03_JumpFloorII/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_03_JumpFloorII/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_03_JumpFloorII/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_04_RectCover/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_04_RectCover/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_04_RectCover/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_04_RectCover/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_04_RectCover/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_04_RectCover/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/10_04_RectCover/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/10_04_RectCover/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/11_MinNumberInRotatedArray/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/12_StringPathInMatrix/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/12_StringPathInMatrix/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/12_StringPathInMatrix/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/12_StringPathInMatrix/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/12_StringPathInMatrix/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/12_StringPathInMatrix/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/12_StringPathInMatrix/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/12_StringPathInMatrix/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/13_RobotMove/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/13_RobotMove/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/13_RobotMove/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/13_RobotMove/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/13_RobotMove/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/13_RobotMove/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/13_RobotMove/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/13_RobotMove/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/14_CuttingRope/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/14_CuttingRope/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/14_CuttingRope/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/14_CuttingRope/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/14_CuttingRope/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/14_CuttingRope/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/14_CuttingRope/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/14_CuttingRope/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/15_NumberOf1InBinary/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/15_NumberOf1InBinary/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/15_NumberOf1InBinary/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/15_NumberOf1InBinary/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/15_NumberOf1InBinary/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/15_NumberOf1InBinary/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/15_NumberOf1InBinary/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/15_NumberOf1InBinary/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/16_Power/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/16_Power/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/16_Power/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/16_Power/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/16_Power/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/16_Power/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/16_Power/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/16_Power/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/17_Print1ToMaxOfNDigits/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_01_DeleteNodeInList/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/18_02_DeleteDuplicatedNode/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/19_RegularExpressionsMatching/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/20_NumericStrings/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/20_NumericStrings/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/20_NumericStrings/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/20_NumericStrings/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/20_NumericStrings/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/20_NumericStrings/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/20_NumericStrings/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/20_NumericStrings/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/20_NumericStrings/Solution1.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/20_NumericStrings/Solution1.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/20_NumericStrings/Solution1.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/20_NumericStrings/Solution1.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/21_ReorderArray/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/21_ReorderArray/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/21_ReorderArray/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/21_ReorderArray/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/21_ReorderArray/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/21_ReorderArray/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/21_ReorderArray/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/21_ReorderArray/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/22_KthNodeFromEnd/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/22_KthNodeFromEnd/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/22_KthNodeFromEnd/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/22_KthNodeFromEnd/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/22_KthNodeFromEnd/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/22_KthNodeFromEnd/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/22_KthNodeFromEnd/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/22_KthNodeFromEnd/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/23_EntryNodeInListLoop/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/24_ReverseList/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/24_ReverseList/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/24_ReverseList/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/24_ReverseList/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/24_ReverseList/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/24_ReverseList/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/24_ReverseList/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/24_ReverseList/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/25_MergeSortedLists/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/25_MergeSortedLists/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/25_MergeSortedLists/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/25_MergeSortedLists/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/25_MergeSortedLists/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/25_MergeSortedLists/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/25_MergeSortedLists/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/25_MergeSortedLists/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/26_SubstructureInTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/26_SubstructureInTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/26_SubstructureInTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/26_SubstructureInTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/26_SubstructureInTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/26_SubstructureInTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/26_SubstructureInTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/26_SubstructureInTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/27_MirrorOfBinaryTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/28_SymmetricalBinaryTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/29_PrintMatrix/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/29_PrintMatrix/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/29_PrintMatrix/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/29_PrintMatrix/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/29_PrintMatrix/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/29_PrintMatrix/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/29_PrintMatrix/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/29_PrintMatrix/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/30_MinInStack/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/30_MinInStack/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/30_MinInStack/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/30_MinInStack/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/30_MinInStack/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/30_MinInStack/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/30_MinInStack/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/30_MinInStack/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/31_StackPushPopOrder/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/31_StackPushPopOrder/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/31_StackPushPopOrder/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/31_StackPushPopOrder/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/31_StackPushPopOrder/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/31_StackPushPopOrder/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/31_StackPushPopOrder/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/31_StackPushPopOrder/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_01_PrintTreeFromTopToBottom/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_02_PrintTreesInLines/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/32_03_PrintTreesInZigzag/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/33_SquenceOfBST/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/33_SquenceOfBST/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/33_SquenceOfBST/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/33_SquenceOfBST/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/33_SquenceOfBST/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/33_SquenceOfBST/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/33_SquenceOfBST/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/33_SquenceOfBST/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/34_PathInTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/34_PathInTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/34_PathInTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/34_PathInTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/34_PathInTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/34_PathInTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/34_PathInTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/34_PathInTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/35_CopyComplexList/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/35_CopyComplexList/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/35_CopyComplexList/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/35_CopyComplexList/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/35_CopyComplexList/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/35_CopyComplexList/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/35_CopyComplexList/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/35_CopyComplexList/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/36_ConvertBinarySearchTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/37_SerializeBinaryTrees/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/38_StringPermutation/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/38_StringPermutation/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/38_StringPermutation/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/38_StringPermutation/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/38_StringPermutation/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/38_StringPermutation/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/38_StringPermutation/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/38_StringPermutation/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/39_MoreThanHalfNumber/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/40_KLeastNumbers/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/40_KLeastNumbers/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/40_KLeastNumbers/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/40_KLeastNumbers/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/40_KLeastNumbers/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/40_KLeastNumbers/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/40_KLeastNumbers/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/40_KLeastNumbers/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/41_StreamMedian/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/41_StreamMedian/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/41_StreamMedian/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/41_StreamMedian/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/41_StreamMedian/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/41_StreamMedian/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/41_StreamMedian/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/41_StreamMedian/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/42_GreatestSumOfSubarrays/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/43_NumberOf1/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/43_NumberOf1/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/43_NumberOf1/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/43_NumberOf1/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/43_NumberOf1/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/43_NumberOf1/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/43_NumberOf1/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/43_NumberOf1/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/44_DigitsInSequence/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/44_DigitsInSequence/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/44_DigitsInSequence/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/44_DigitsInSequence/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/44_DigitsInSequence/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/44_DigitsInSequence/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/44_DigitsInSequence/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/44_DigitsInSequence/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/45_SortArrayForMinNumber/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/46_TranslateNumbersToStrings/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/47_MaxValueOfGifts/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/47_MaxValueOfGifts/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/47_MaxValueOfGifts/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/47_MaxValueOfGifts/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/47_MaxValueOfGifts/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/47_MaxValueOfGifts/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/47_MaxValueOfGifts/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/47_MaxValueOfGifts/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/48_LongestSubstringWithoutDup/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/49_UglyNumber/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/49_UglyNumber/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/49_UglyNumber/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/49_UglyNumber/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/49_UglyNumber/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/49_UglyNumber/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/49_UglyNumber/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/49_UglyNumber/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_01_FirstNotRepeatingChar/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/50_02_FristCharacterInStream/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/52_FirstCommonNodesInLists/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_01_NumberOfK/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_01_NumberOfK/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_01_NumberOfK/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_01_NumberOfK/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_01_NumberOfK/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_01_NumberOfK/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_01_NumberOfK/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_01_NumberOfK/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_02_MissingNumber/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_02_MissingNumber/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_02_MissingNumber/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_02_MissingNumber/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_02_MissingNumber/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_02_MissingNumber/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_02_MissingNumber/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_02_MissingNumber/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/53_03_IntegerIdenticalToIndex/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/54_KthNodeInBST/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/54_KthNodeInBST/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/54_KthNodeInBST/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/54_KthNodeInBST/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/54_KthNodeInBST/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/54_KthNodeInBST/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/54_KthNodeInBST/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/54_KthNodeInBST/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_01_TreeDepth/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_01_TreeDepth/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_01_TreeDepth/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_01_TreeDepth/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_01_TreeDepth/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_01_TreeDepth/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_01_TreeDepth/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_01_TreeDepth/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/55_02_BalancedBinaryTree/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_01_NumbersAppearOnce/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/56_02_NumberAppearingOnce/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_01_TwoNumbersWithSum/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/57_02_ContinuousSquenceWithSum/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_01_ReverseWordsInSentence/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_02_LeftRotateString/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_02_LeftRotateString/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_02_LeftRotateString/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_02_LeftRotateString/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_02_LeftRotateString/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_02_LeftRotateString/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/58_02_LeftRotateString/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/58_02_LeftRotateString/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/59_01_MaxInSlidingWindow/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/61_ContinousCards/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/61_ContinousCards/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/61_ContinousCards/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/61_ContinousCards/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/61_ContinousCards/Solution.java" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/61_ContinousCards/Solution.java" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/61_ContinousCards/Solution.java" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/61_ContinousCards/Solution.java" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/README.md" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/README.md" diff --git "a/\344\270\223\346\240\217/\345\211\221\346\214\207offer/\345\211\221\346\214\207offer.pdf" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/\345\211\221\346\214\207offer.pdf" similarity index 100% rename from "\344\270\223\346\240\217/\345\211\221\346\214\207offer/\345\211\221\346\214\207offer.pdf" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\211\221\346\214\207offer/\345\211\221\346\214\207offer.pdf" diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/1" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/1" new file mode 100644 index 00000000..0ba361ad --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/1" @@ -0,0 +1,6 @@ +志洋/展升/张冲 300 +云平/建华 300 +毕总 300 +铭泽/赵倩 400 +良许/四哥/骆总 400 +老婆/谷总 300 diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/BAT\351\235\242\350\257\225\345\270\270\351\227\25680\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/BAT\351\235\242\350\257\225\345\270\270\351\227\25680\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/BAT\351\235\242\350\257\225\345\270\270\351\227\25680\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/BAT\351\235\242\350\257\225\345\270\270\351\227\25680\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/.DS_Store" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/.DS_Store" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/.DS_Store" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/.DS_Store" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/C++\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246300\351\241\265.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/C++\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246300\351\241\265.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/C++\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246300\351\241\265.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/C++\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246300\351\241\265.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/Oracle.10g.PlSQL.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/Oracle.10g.PlSQL.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/Oracle.10g.PlSQL.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/Oracle.10g.PlSQL.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/README.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/README.md" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/README.md" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/README.md" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\344\270\264\347\225\214\345\214\272.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\344\270\264\347\225\214\345\214\272.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\344\270\264\347\225\214\345\214\272.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\344\270\264\347\225\214\345\214\272.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\345\215\203\346\226\271\347\231\276\350\256\241C\350\257\255\350\250\200\351\203\250\345\210\206(500\351\242\230).zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\345\215\203\346\226\271\347\231\276\350\256\241C\350\257\255\350\250\200\351\203\250\345\210\206(500\351\242\230).zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\345\215\203\346\226\271\347\231\276\350\256\241C\350\257\255\350\250\200\351\203\250\345\210\206(500\351\242\230).zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\345\215\203\346\226\271\347\231\276\350\256\241C\350\257\255\350\250\200\351\203\250\345\210\206(500\351\242\230).zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\346\231\272\345\212\233\351\242\230\346\225\264\347\220\206.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\346\231\272\345\212\233\351\242\230\346\225\264\347\220\206.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\346\231\272\345\212\233\351\242\230\346\225\264\347\220\206.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\346\231\272\345\212\233\351\242\230\346\225\264\347\220\206.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\216\213\347\211\2147 C++\345\270\270\350\247\201\351\235\242\350\257\225\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\216\213\347\211\2147 C++\345\270\270\350\247\201\351\235\242\350\257\225\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\216\213\347\211\2147 C++\345\270\270\350\247\201\351\235\242\350\257\225\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\216\213\347\211\2147 C++\345\270\270\350\247\201\351\235\242\350\257\225\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\231\276\351\227\256\347\231\276\347\255\224.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\231\276\351\227\256\347\231\276\347\255\224.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\231\276\351\227\256\347\231\276\347\255\224.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\347\231\276\351\227\256\347\231\276\347\255\224.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\347\254\224\350\257\225.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\347\254\224\350\257\225.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\347\254\224\350\257\225.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\347\254\224\350\257\225.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\351\242\230\345\217\212\345\237\272\346\234\254\347\237\245\350\257\206.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\351\242\230\345\217\212\345\237\272\346\234\254\347\237\245\350\257\206.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\351\242\230\345\217\212\345\237\272\346\234\254\347\237\245\350\257\206.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/C&C++/\351\235\242\350\257\225\351\242\230\345\217\212\345\237\272\346\234\254\347\237\245\350\257\206.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/ActiveMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/ActiveMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/ActiveMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/ActiveMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Dubbo\351\235\242\350\257\225\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JAVA \351\235\242\350\257\225\351\242\230 18 \347\257\207.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JAVA \351\235\242\350\257\225\351\242\230 18 \347\257\207.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JAVA \351\235\242\350\257\225\351\242\230 18 \347\257\207.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JAVA \351\235\242\350\257\225\351\242\230 18 \347\257\207.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JVM\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JVM\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JVM\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/JVM\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\237\272\347\241\200\351\235\242\350\257\225\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\237\272\347\241\200\351\235\242\350\257\225\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\237\272\347\241\200\351\235\242\350\257\225\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\237\272\347\241\200\351\235\242\350\257\225\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\271\266\345\217\221\344\275\223\347\263\273\347\237\245\350\257\206\345\257\274\345\233\276\347\254\224\350\256\260.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\271\266\345\217\221\344\275\223\347\263\273\347\237\245\350\257\206\345\257\274\345\233\276\347\254\224\350\256\260.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\271\266\345\217\221\344\275\223\347\263\273\347\237\245\350\257\206\345\257\274\345\233\276\347\254\224\350\256\260.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\345\271\266\345\217\221\344\275\223\347\263\273\347\237\245\350\257\206\345\257\274\345\233\276\347\254\224\350\256\260.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\346\240\270\345\277\203\347\237\245\350\257\206\347\202\271\346\225\264\347\220\206.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\346\240\270\345\277\203\347\237\245\350\257\206\347\202\271\346\225\264\347\220\206.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\346\240\270\345\277\203\347\237\245\350\257\206\347\202\271\346\225\264\347\220\206.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Java\346\240\270\345\277\203\347\237\245\350\257\206\347\202\271\346\225\264\347\220\206.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Kafka\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Kafka\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Kafka\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Kafka\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Linux\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Linux\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Linux\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Linux\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MongoDB\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MongoDB\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MongoDB\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MongoDB\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MyBatis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MyBatis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MyBatis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MyBatis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL55\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL55\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL55\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL55\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL\346\200\247\350\203\275\344\274\230\345\214\226\347\232\20421\344\270\252\346\234\200\344\275\263\345\256\236\350\267\265.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL\346\200\247\350\203\275\344\274\230\345\214\226\347\232\20421\344\270\252\346\234\200\344\275\263\345\256\236\350\267\265.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL\346\200\247\350\203\275\344\274\230\345\214\226\347\232\20421\344\270\252\346\234\200\344\275\263\345\256\236\350\267\265.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/MySQL\346\200\247\350\203\275\344\274\230\345\214\226\347\232\20421\344\270\252\346\234\200\344\275\263\345\256\236\350\267\265.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Netty\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Netty\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Netty\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Netty\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Nginx\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Nginx\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Nginx\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Nginx\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/RabbitMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/RabbitMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/RabbitMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/RabbitMQ\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Redis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Redis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Redis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Redis\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SQL\344\274\230\345\214\226\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SQL\344\274\230\345\214\226\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SQL\344\274\230\345\214\226\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SQL\344\274\230\345\214\226\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringBoot\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringBoot\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringBoot\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringBoot\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringCloud\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringCloud\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringCloud\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringCloud\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringMVC\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringMVC\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringMVC\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/SpringMVC\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Spring\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Spring\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Spring\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Spring\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Tomcat\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Tomcat\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Tomcat\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/Tomcat\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/java\345\220\216\347\253\257\351\235\242\350\257\225\351\242\230\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/java\345\220\216\347\253\257\351\235\242\350\257\225\351\242\230\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/java\345\220\216\347\253\257\351\235\242\350\257\225\351\242\230\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/java\345\220\216\347\253\257\351\235\242\350\257\225\351\242\230\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/memcached\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/memcached\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/memcached\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/memcached\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/mysql\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/mysql\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/mysql\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/mysql\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/redis\351\235\242\350\257\225\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/redis\351\235\242\350\257\225\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/redis\351\235\242\350\257\225\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/redis\351\235\242\350\257\225\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/zookeeper\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/zookeeper\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/zookeeper\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/zookeeper\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\244\232\347\272\277\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\244\232\347\272\277\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\244\232\347\272\277\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\244\232\347\272\277\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\345\217\212\347\255\224\346\241\210\357\274\210\344\270\212\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\271\266\345\217\221\347\274\226\347\250\213\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210\357\274\210\344\270\213\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\274\200\346\272\220\346\241\206\346\236\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\274\200\346\272\220\346\241\206\346\236\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\274\200\346\272\220\346\241\206\346\236\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\274\200\346\272\220\346\241\206\346\236\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\276\256\346\234\215\345\212\241\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\276\256\346\234\215\345\212\241\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\276\256\346\234\215\345\212\241\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\345\276\256\346\234\215\345\212\241\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\225\260\346\215\256\345\272\223\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\225\260\346\215\256\345\272\223\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\225\260\346\215\256\345\272\223\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\225\260\346\215\256\345\272\223\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\346\266\210\346\201\257\344\270\255\351\227\264\344\273\266\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\256\276\350\256\241\346\250\241\345\274\217\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\256\276\350\256\241\346\250\241\345\274\217\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\256\276\350\256\241\346\250\241\345\274\217\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\350\256\276\350\256\241\346\250\241\345\274\217\351\235\242\350\257\225\344\270\223\351\242\230\345\217\212\347\255\224\346\241\210.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\351\235\242\350\257\225\345\277\205\345\244\207\344\271\213\344\271\220\350\247\202\351\224\201\344\270\216\346\202\262\350\247\202\351\224\201.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\351\235\242\350\257\225\345\277\205\345\244\207\344\271\213\344\271\220\350\247\202\351\224\201\344\270\216\346\202\262\350\247\202\351\224\201.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\351\235\242\350\257\225\345\277\205\345\244\207\344\271\213\344\271\220\350\247\202\351\224\201\344\270\216\346\202\262\350\247\202\351\224\201.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Java/\351\235\242\350\257\225\345\277\205\345\244\207\344\271\213\344\271\220\350\247\202\351\224\201\344\270\216\346\202\262\350\247\202\351\224\201.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/MySQL\351\235\242\350\257\225\351\242\230\357\274\210\345\220\253\347\255\224\346\241\210\357\274\211@www.java1234.com.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/MySQL\351\235\242\350\257\225\351\242\230\357\274\210\345\220\253\347\255\224\346\241\210\357\274\211@www.java1234.com.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/MySQL\351\235\242\350\257\225\351\242\230\357\274\210\345\220\253\347\255\224\346\241\210\357\274\211@www.java1234.com.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/MySQL\351\235\242\350\257\225\351\242\230\357\274\210\345\220\253\347\255\224\346\241\210\357\274\211@www.java1234.com.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\217\262\344\270\212\346\234\200\350\257\246\347\273\206\347\232\204\344\270\200\347\272\277\345\244\247\345\216\202Mysql\351\235\242\350\257\225\351\242\230\350\257\246\350\247\243.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\217\262\344\270\212\346\234\200\350\257\246\347\273\206\347\232\204\344\270\200\347\272\277\345\244\247\345\216\202Mysql\351\235\242\350\257\225\351\242\230\350\257\246\350\247\243.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\217\262\344\270\212\346\234\200\350\257\246\347\273\206\347\232\204\344\270\200\347\272\277\345\244\247\345\216\202Mysql\351\235\242\350\257\225\351\242\230\350\257\246\350\247\243.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\217\262\344\270\212\346\234\200\350\257\246\347\273\206\347\232\204\344\270\200\347\272\277\345\244\247\345\216\202Mysql\351\235\242\350\257\225\351\242\230\350\257\246\350\247\243.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\274\272\347\203\210\346\216\250\350\215\220MySQL\351\235\242\350\257\225\351\242\230\345\222\214\347\255\224\346\241\210\357\274\210\344\273\205\344\276\233\345\217\202\350\200\203\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\274\272\347\203\210\346\216\250\350\215\220MySQL\351\235\242\350\257\225\351\242\230\345\222\214\347\255\224\346\241\210\357\274\210\344\273\205\344\276\233\345\217\202\350\200\203\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\274\272\347\203\210\346\216\250\350\215\220MySQL\351\235\242\350\257\225\351\242\230\345\222\214\347\255\224\346\241\210\357\274\210\344\273\205\344\276\233\345\217\202\350\200\203\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\345\274\272\347\203\210\346\216\250\350\215\220MySQL\351\235\242\350\257\225\351\242\230\345\222\214\347\255\224\346\241\210\357\274\210\344\273\205\344\276\233\345\217\202\350\200\203\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Mysql/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/.DS_Store" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/.DS_Store" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/.DS_Store" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/.DS_Store" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/Python\346\240\270\345\277\203\347\274\226\347\250\213\347\254\2543\347\211\210_\344\270\255\346\226\207&\350\213\261\346\226\207&\351\232\217\344\271\246\346\272\220\347\240\201.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/Python\346\240\270\345\277\203\347\274\226\347\250\213\347\254\2543\347\211\210_\344\270\255\346\226\207&\350\213\261\346\226\207&\351\232\217\344\271\246\346\272\220\347\240\201.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/Python\346\240\270\345\277\203\347\274\226\347\250\213\347\254\2543\347\211\210_\344\270\255\346\226\207&\350\213\261\346\226\207&\351\232\217\344\271\246\346\272\220\347\240\201.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/Python\346\240\270\345\277\203\347\274\226\347\250\213\347\254\2543\347\211\210_\344\270\255\346\226\207&\350\213\261\346\226\207&\351\232\217\344\271\246\346\272\220\347\240\201.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\345\205\250\347\275\221\346\234\200\347\201\253\347\232\204100\351\201\223 Python \351\235\242\350\257\225\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\345\205\250\347\275\221\346\234\200\347\201\253\347\232\204100\351\201\223 Python \351\235\242\350\257\225\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\345\205\250\347\275\221\346\234\200\347\201\253\347\232\204100\351\201\223 Python \351\235\242\350\257\225\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\345\205\250\347\275\221\346\234\200\347\201\253\347\232\204100\351\201\223 Python \351\235\242\350\257\225\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\244\276\346\213\233110\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\244\276\346\213\233110\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\244\276\346\213\233110\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\244\276\346\213\233110\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\247\213\346\213\23350\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\247\213\346\213\23350\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\247\213\346\213\23350\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\347\247\213\346\213\23350\351\201\223Python\351\235\242\350\257\225\351\242\230\351\233\206\351\224\246.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/Python/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/.DS_Store" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/.DS_Store" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/.DS_Store" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/.DS_Store" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/2020\345\214\227\344\272\254+\345\244\251\346\264\245\351\235\242\350\257\225\351\227\256\351\242\230\346\261\207\346\200\273.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/2020\345\214\227\344\272\254+\345\244\251\346\264\245\351\235\242\350\257\225\351\227\256\351\242\230\346\261\207\346\200\273.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/2020\345\214\227\344\272\254+\345\244\251\346\264\245\351\235\242\350\257\225\351\227\256\351\242\230\346\261\207\346\200\273.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/2020\345\214\227\344\272\254+\345\244\251\346\264\245\351\235\242\350\257\225\351\227\256\351\242\230\346\261\207\346\200\273.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\345\246\202\344\275\225\345\234\250\345\244\247\345\216\202\350\277\233\350\241\214\345\211\215\347\253\257\345\274\200\345\217\221\357\274\210\350\247\204\350\214\203\346\211\213\345\206\214\357\274\211.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\345\246\202\344\275\225\345\234\250\345\244\247\345\216\202\350\277\233\350\241\214\345\211\215\347\253\257\345\274\200\345\217\221\357\274\210\350\247\204\350\214\203\346\211\213\345\206\214\357\274\211.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\345\246\202\344\275\225\345\234\250\345\244\247\345\216\202\350\277\233\350\241\214\345\211\215\347\253\257\345\274\200\345\217\221\357\274\210\350\247\204\350\214\203\346\211\213\345\206\214\357\274\211.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\345\246\202\344\275\225\345\234\250\345\244\247\345\216\202\350\277\233\350\241\214\345\211\215\347\253\257\345\274\200\345\217\221\357\274\210\350\247\204\350\214\203\346\211\213\345\206\214\357\274\211.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\345\211\215\347\253\257/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/1000\351\201\223Java\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/1000\351\201\223Java\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/1000\351\201\223Java\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/1000\351\201\223Java\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/Java\346\236\266\346\236\204\346\212\200\350\203\275\345\233\276\350\260\261\345\222\214\351\235\242\350\257\225130\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/Java\346\236\266\346\236\204\346\212\200\350\203\275\345\233\276\350\260\261\345\222\214\351\235\242\350\257\225130\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/Java\346\236\266\346\236\204\346\212\200\350\203\275\345\233\276\350\260\261\345\222\214\351\235\242\350\257\225130\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/Java\346\236\266\346\236\204\346\212\200\350\203\275\345\233\276\350\260\261\345\222\214\351\235\242\350\257\225130\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\346\234\200\345\205\250\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225130\351\242\230.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\346\234\200\345\205\250\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225130\351\242\230.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\346\234\200\345\205\250\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225130\351\242\230.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\346\234\200\345\205\250\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225130\351\242\230.zip" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\346\236\266\346\236\204\345\270\210\351\235\242\350\257\225\351\242\230/\350\247\243\345\216\213\345\257\206\347\240\201\345\234\250\350\277\231\351\207\214/\350\247\243\345\216\213\345\257\206\347\240\201\350\277\231\351\207\214 .jpg" diff --git "a/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\351\253\230\345\271\266\345\217\221\344\270\223\346\240\217.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\351\253\230\345\271\266\345\217\221\344\270\223\346\240\217.zip" similarity index 100% rename from "\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\351\253\230\345\271\266\345\217\221\344\270\223\346\240\217.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\244\247\345\216\202\351\235\242\347\273\217\346\261\207\346\200\273100\347\257\207/\351\253\230\345\271\266\345\217\221\344\270\223\346\240\217.zip" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\345\270\270\347\224\250\346\216\250\350\215\220\347\256\227\346\263\225.pdf" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\270\270\347\224\250\346\216\250\350\215\220\347\256\227\346\263\225.pdf" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\345\270\270\347\224\250\346\216\250\350\215\220\347\256\227\346\263\225.pdf" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\270\270\347\224\250\346\216\250\350\215\220\347\256\227\346\263\225.pdf" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\345\276\256\350\275\257\351\235\242\350\257\225100\351\242\230\347\263\273\345\210\227.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\345\276\256\350\275\257\351\235\242\350\257\225100\351\242\230\347\263\273\345\210\227.zip" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\345\276\256\350\275\257\351\235\242\350\257\225100\351\242\230\347\263\273\345\210\227.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\345\276\256\350\275\257\351\235\242\350\257\225100\351\242\230\347\263\273\345\210\227.zip" diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\345\206\205\345\255\230\347\256\241\347\220\206.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\345\206\205\345\255\230\347\256\241\347\220\206.md" new file mode 100644 index 00000000..b0518efd --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\345\206\205\345\255\230\347\256\241\347\220\206.md" @@ -0,0 +1,144 @@ + +* [虚拟内存](#虚拟内存) +* [分页系统地址映射](#分页系统地址映射) +* [页面置换算法](#页面置换算法) + * [1. 最佳](#1-最佳) + * [2. 最近最久未使用](#2-最近最久未使用) + * [3. 最近未使用](#3-最近未使用) + * [4. 先进先出](#4-先进先出) + * [5. 第二次机会算法](#5-第二次机会算法) + * [6. 时钟](#6-时钟) +* [分段](#分段) +* [段页式](#段页式) +* [分页与分段的比较](#分页与分段的比较) + + + +# 虚拟内存 + +虚拟内存的目的是为了让物理内存扩充成更大的逻辑内存,从而让程序获得更多的可用内存。 + +为了更好的管理内存,操作系统将内存抽象成地址空间。每个程序拥有自己的地址空间,这个地址空间被分割成多个块,每一块称为一页。这些页被映射到物理内存,但不需要映射到连续的物理内存,也不需要所有页都必须在物理内存中。当程序引用到不在物理内存中的页时,由硬件执行必要的映射,将缺失的部分装入物理内存并重新执行失败的指令。 + +从上面的描述中可以看出,虚拟内存允许程序不用将地址空间中的每一页都映射到物理内存,也就是说一个程序不需要全部调入内存就可以运行,这使得有限的内存运行大程序成为可能。例如有一台计算机可以产生 16 位地址,那么一个程序的地址空间范围是 0\~64K。该计算机只有 32KB 的物理内存,虚拟内存技术允许该计算机运行一个 64K 大小的程序。 + +

+ +# 分页系统地址映射 + +内存管理单元(MMU)管理着地址空间和物理内存的转换,其中的页表(Page table)存储着页(程序地址空间)和页框(物理内存空间)的映射表。 + +一个虚拟地址分成两个部分,一部分存储页面号,一部分存储偏移量。 + +下图的页表存放着 16 个页,这 16 个页需要用 4 个比特位来进行索引定位。例如对于虚拟地址(0010 000000000100),前 4 位是存储页面号 2,读取表项内容为(110 1),页表项最后一位表示是否存在于内存中,1 表示存在。后 12 位存储偏移量。这个页对应的页框的地址为 (110 000000000100)。 + +

+ +# 页面置换算法 + +在程序运行过程中,如果要访问的页面不在内存中,就发生缺页中断从而将该页调入内存中。此时如果内存已无空闲空间,系统必须从内存中调出一个页面到磁盘对换区中来腾出空间。 + +页面置换算法和缓存淘汰策略类似,可以将内存看成磁盘的缓存。在缓存系统中,缓存的大小有限,当有新的缓存到达时,需要淘汰一部分已经存在的缓存,这样才有空间存放新的缓存数据。 + +页面置换算法的主要目标是使页面置换频率最低(也可以说缺页率最低)。 + +## 1. 最佳 + +> OPT, Optimal replacement algorithm + +所选择的被换出的页面将是最长时间内不再被访问,通常可以保证获得最低的缺页率。 + +是一种理论上的算法,因为无法知道一个页面多长时间不再被访问。 + +举例:一个系统为某进程分配了三个物理块,并有如下页面引用序列: + +```html +7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 +``` + +开始运行时,先将 7, 0, 1 三个页面装入内存。当进程要访问页面 2 时,产生缺页中断,会将页面 7 换出,因为页面 7 再次被访问的时间最长。 + +## 2. 最近最久未使用 + +> LRU, Least Recently Used + +虽然无法知道将来要使用的页面情况,但是可以知道过去使用页面的情况。LRU 将最近最久未使用的页面换出。 + +为了实现 LRU,需要在内存中维护一个所有页面的链表。当一个页面被访问时,将这个页面移到链表表头。这样就能保证链表表尾的页面是最近最久未访问的。 + +因为每次访问都需要更新链表,因此这种方式实现的 LRU 代价很高。 + +```html +4,7,0,7,1,0,1,2,1,2,6 +``` + +

+## 3. 最近未使用 + +> NRU, Not Recently Used + +每个页面都有两个状态位:R 与 M,当页面被访问时设置页面的 R=1,当页面被修改时设置 M=1。其中 R 位会定时被清零。可以将页面分成以下四类: + +- R=0,M=0 +- R=0,M=1 +- R=1,M=0 +- R=1,M=1 + +当发生缺页中断时,NRU 算法随机地从类编号最小的非空类中挑选一个页面将它换出。 + +NRU 优先换出已经被修改的脏页面(R=0,M=1),而不是被频繁使用的干净页面(R=1,M=0)。 + +## 4. 先进先出 + +> FIFO, First In First Out + +选择换出的页面是最先进入的页面。 + +该算法会将那些经常被访问的页面换出,导致缺页率升高。 + +## 5. 第二次机会算法 + +FIFO 算法可能会把经常使用的页面置换出去,为了避免这一问题,对该算法做一个简单的修改: + +当页面被访问 (读或写) 时设置该页面的 R 位为 1。需要替换的时候,检查最老页面的 R 位。如果 R 位是 0,那么这个页面既老又没有被使用,可以立刻置换掉;如果是 1,就将 R 位清 0,并把该页面放到链表的尾端,修改它的装入时间使它就像刚装入的一样,然后继续从链表的头部开始搜索。 + +

+ +## 6. 时钟 + +> Clock + +第二次机会算法需要在链表中移动页面,降低了效率。时钟算法使用环形链表将页面连接起来,再使用一个指针指向最老的页面。 + +

+ +# 分段 + +虚拟内存采用的是分页技术,也就是将地址空间划分成固定大小的页,每一页再与内存进行映射。 + +下图为一个编译器在编译过程中建立的多个表,有 4 个表是动态增长的,如果使用分页系统的一维地址空间,动态增长的特点会导致覆盖问题的出现。 + +

+ +分段的做法是把每个表分成段,一个段构成一个独立的地址空间。每个段的长度可以不同,并且可以动态增长。 + +

+ +# 段页式 + +程序的地址空间划分成多个拥有独立地址空间的段,每个段上的地址空间划分成大小相同的页。这样既拥有分段系统的共享和保护,又拥有分页系统的虚拟内存功能。 + +# 分页与分段的比较 + +- 对程序员的透明性:分页透明,但是分段需要程序员显式划分每个段。 + +- 地址空间的维度:分页是一维地址空间,分段是二维的。 + +- 大小是否可以改变:页的大小不可变,段的大小可以动态改变。 + +- 出现的原因:分页主要用于实现虚拟内存,从而获得更大的地址空间;分段主要是为了使程序和数据可以被划分为逻辑上独立的地址空间并且有助于共享和保护。 + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\346\255\273\351\224\201.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\346\255\273\351\224\201.md" new file mode 100644 index 00000000..1346f087 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\346\255\273\351\224\201.md" @@ -0,0 +1,149 @@ + +* [必要条件](#必要条件) +* [处理方法](#处理方法) +* [鸵鸟策略](#鸵鸟策略) +* [死锁检测与死锁恢复](#死锁检测与死锁恢复) + * [1. 每种类型一个资源的死锁检测](#1-每种类型一个资源的死锁检测) + * [2. 每种类型多个资源的死锁检测](#2-每种类型多个资源的死锁检测) + * [3. 死锁恢复](#3-死锁恢复) +* [死锁预防](#死锁预防) + * [1. 破坏互斥条件](#1-破坏互斥条件) + * [2. 破坏占有和等待条件](#2-破坏占有和等待条件) + * [3. 破坏不可抢占条件](#3-破坏不可抢占条件) + * [4. 破坏环路等待](#4-破坏环路等待) +* [死锁避免](#死锁避免) + * [1. 安全状态](#1-安全状态) + * [2. 单个资源的银行家算法](#2-单个资源的银行家算法) + * [3. 多个资源的银行家算法](#3-多个资源的银行家算法) + + + +# 必要条件 + +

+ +- 互斥:每个资源要么已经分配给了一个进程,要么就是可用的。 +- 占有和等待:已经得到了某个资源的进程可以再请求新的资源。 +- 不可抢占:已经分配给一个进程的资源不能强制性地被抢占,它只能被占有它的进程显式地释放。 +- 环路等待:有两个或者两个以上的进程组成一条环路,该环路中的每个进程都在等待下一个进程所占有的资源。 + +# 处理方法 + +主要有以下四种方法: + +- 鸵鸟策略 +- 死锁检测与死锁恢复 +- 死锁预防 +- 死锁避免 + +# 鸵鸟策略 + +把头埋在沙子里,假装根本没发生问题。 + +因为解决死锁问题的代价很高,因此鸵鸟策略这种不采取任务措施的方案会获得更高的性能。 + +当发生死锁时不会对用户造成多大影响,或发生死锁的概率很低,可以采用鸵鸟策略。 + +大多数操作系统,包括 Unix,Linux 和 Windows,处理死锁问题的办法仅仅是忽略它。 + +# 死锁检测与死锁恢复 + +不试图阻止死锁,而是当检测到死锁发生时,采取措施进行恢复。 + +## 1. 每种类型一个资源的死锁检测 + +

+ +上图为资源分配图,其中方框表示资源,圆圈表示进程。资源指向进程表示该资源已经分配给该进程,进程指向资源表示进程请求获取该资源。 + +图 a 可以抽取出环,如图 b,它满足了环路等待条件,因此会发生死锁。 + +每种类型一个资源的死锁检测算法是通过检测有向图是否存在环来实现,从一个节点出发进行深度优先搜索,对访问过的节点进行标记,如果访问了已经标记的节点,就表示有向图存在环,也就是检测到死锁的发生。 + +## 2. 每种类型多个资源的死锁检测 + +

+ +上图中,有三个进程四个资源,每个数据代表的含义如下: + +- E 向量:资源总量 +- A 向量:资源剩余量 +- C 矩阵:每个进程所拥有的资源数量,每一行都代表一个进程拥有资源的数量 +- R 矩阵:每个进程请求的资源数量 + +进程 P1 和 P2 所请求的资源都得不到满足,只有进程 P3 可以,让 P3 执行,之后释放 P3 拥有的资源,此时 A = (2 2 2 0)。P2 可以执行,执行后释放 P2 拥有的资源,A = (4 2 2 1) 。P1 也可以执行。所有进程都可以顺利执行,没有死锁。 + +算法总结如下: + +每个进程最开始时都不被标记,执行过程有可能被标记。当算法结束时,任何没有被标记的进程都是死锁进程。 + +1. 寻找一个没有标记的进程 Pi,它所请求的资源小于等于 A。 +2. 如果找到了这样一个进程,那么将 C 矩阵的第 i 行向量加到 A 中,标记该进程,并转回 1。 +3. 如果没有这样一个进程,算法终止。 + +## 3. 死锁恢复 + +- 利用抢占恢复 +- 利用回滚恢复 +- 通过杀死进程恢复 + +# 死锁预防 + +在程序运行之前预防发生死锁。 + +## 1. 破坏互斥条件 + +例如假脱机打印机技术允许若干个进程同时输出,唯一真正请求物理打印机的进程是打印机守护进程。 + +## 2. 破坏占有和等待条件 + +一种实现方式是规定所有进程在开始执行前请求所需要的全部资源。 + +## 3. 破坏不可抢占条件 + +## 4. 破坏环路等待 + +给资源统一编号,进程只能按编号顺序来请求资源。 + +# 死锁避免 + +在程序运行时避免发生死锁。 + +## 1. 安全状态 + +

+ +图 a 的第二列 Has 表示已拥有的资源数,第三列 Max 表示总共需要的资源数,Free 表示还有可以使用的资源数。从图 a 开始出发,先让 B 拥有所需的所有资源(图 b),运行结束后释放 B,此时 Free 变为 5(图 c);接着以同样的方式运行 C 和 A,使得所有进程都能成功运行,因此可以称图 a 所示的状态时安全的。 + +定义:如果没有死锁发生,并且即使所有进程突然请求对资源的最大需求,也仍然存在某种调度次序能够使得每一个进程运行完毕,则称该状态是安全的。 + +安全状态的检测与死锁的检测类似,因为安全状态必须要求不能发生死锁。下面的银行家算法与死锁检测算法非常类似,可以结合着做参考对比。 + +## 2. 单个资源的银行家算法 + +一个小城镇的银行家,他向一群客户分别承诺了一定的贷款额度,算法要做的是判断对请求的满足是否会进入不安全状态,如果是,就拒绝请求;否则予以分配。 + +

+ +上图 c 为不安全状态,因此算法会拒绝之前的请求,从而避免进入图 c 中的状态。 + +## 3. 多个资源的银行家算法 + +

+ +上图中有五个进程,四个资源。左边的图表示已经分配的资源,右边的图表示还需要分配的资源。最右边的 E、P 以及 A 分别表示:总资源、已分配资源以及可用资源,注意这三个为向量,而不是具体数值,例如 A=(1020),表示 4 个资源分别还剩下 1/0/2/0。 + +检查一个状态是否安全的算法如下: + +- 查找右边的矩阵是否存在一行小于等于向量 A。如果不存在这样的行,那么系统将会发生死锁,状态是不安全的。 +- 假若找到这样一行,将该进程标记为终止,并将其已分配资源加到 A 中。 +- 重复以上两步,直到所有进程都标记为终止,则状态时安全的。 + +如果一个状态不是安全的,需要拒绝进入这个状态。 + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\347\243\201\347\233\230\350\260\203\345\272\246.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\347\243\201\347\233\230\350\260\203\345\272\246.md" new file mode 100644 index 00000000..6a91822b --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\347\243\201\347\233\230\350\260\203\345\272\246.md" @@ -0,0 +1,65 @@ + +* [磁盘结构](#磁盘结构) +* [磁盘调度算法](#磁盘调度算法) + * [1. 先来先服务](#1-先来先服务) + * [2. 最短寻道时间优先](#2-最短寻道时间优先) + * [3. 电梯算法](#3-电梯算法) + + + +# 磁盘结构 + +- 盘面(Platter):一个磁盘有多个盘面; +- 磁道(Track):盘面上的圆形带状区域,一个盘面可以有多个磁道; +- 扇区(Track Sector):磁道上的一个弧段,一个磁道可以有多个扇区,它是最小的物理储存单位,目前主要有 512 bytes 与 4 K 两种大小; +- 磁头(Head):与盘面非常接近,能够将盘面上的磁场转换为电信号(读),或者将电信号转换为盘面的磁场(写); +- 制动手臂(Actuator arm):用于在磁道之间移动磁头; +- 主轴(Spindle):使整个盘面转动。 + +

+ +# 磁盘调度算法 + +读写一个磁盘块的时间的影响因素有: + +- 旋转时间(主轴转动盘面,使得磁头移动到适当的扇区上) +- 寻道时间(制动手臂移动,使得磁头移动到适当的磁道上) +- 实际的数据传输时间 + +其中,寻道时间最长,因此磁盘调度的主要目标是使磁盘的平均寻道时间最短。 + +## 1. 先来先服务 + +> FCFS, First Come First Served + +按照磁盘请求的顺序进行调度。 + +优点是公平和简单。缺点也很明显,因为未对寻道做任何优化,使平均寻道时间可能较长。 + +## 2. 最短寻道时间优先 + +> SSTF, Shortest Seek Time First + +优先调度与当前磁头所在磁道距离最近的磁道。 + +虽然平均寻道时间比较低,但是不够公平。如果新到达的磁道请求总是比一个在等待的磁道请求近,那么在等待的磁道请求会一直等待下去,也就是出现饥饿现象。具体来说,两端的磁道请求更容易出现饥饿现象。 + +

+ +## 3. 电梯算法 + +> SCAN + +电梯总是保持一个方向运行,直到该方向没有请求为止,然后改变运行方向。 + +电梯算法(扫描算法)和电梯的运行过程类似,总是按一个方向来进行磁盘调度,直到该方向上没有未完成的磁盘请求,然后改变方向。 + +因为考虑了移动方向,因此所有的磁盘请求都会被满足,解决了 SSTF 的饥饿问题。 + + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\350\277\233\347\250\213\347\256\241\347\220\206.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\350\277\233\347\250\213\347\256\241\347\220\206.md" new file mode 100644 index 00000000..60d4951c --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\350\277\233\347\250\213\347\256\241\347\220\206.md" @@ -0,0 +1,601 @@ + +* [进程与线程](#进程与线程) + * [1. 进程](#1-进程) + * [2. 线程](#2-线程) + * [3. 区别](#3-区别) +* [进程状态的切换](#进程状态的切换) +* [进程调度算法](#进程调度算法) + * [1. 批处理系统](#1-批处理系统) + * [2. 交互式系统](#2-交互式系统) + * [3. 实时系统](#3-实时系统) +* [进程同步](#进程同步) + * [1. 临界区](#1-临界区) + * [2. 同步与互斥](#2-同步与互斥) + * [3. 信号量](#3-信号量) + * [4. 管程](#4-管程) +* [经典同步问题](#经典同步问题) + * [1. 哲学家进餐问题](#1-哲学家进餐问题) + * [2. 读者-写者问题](#2-读者-写者问题) +* [进程通信](#进程通信) + * [1. 管道](#1-管道) + * [2. FIFO](#2-fifo) + * [3. 消息队列](#3-消息队列) + * [4. 信号量](#4-信号量) + * [5. 共享存储](#5-共享存储) + * [6. 套接字](#6-套接字) + + + +# 进程与线程 + +## 1. 进程 + +进程是资源分配的基本单位。 + +进程控制块 (Process Control Block, PCB) 描述进程的基本信息和运行状态,所谓的创建进程和撤销进程,都是指对 PCB 的操作。 + +下图显示了 4 个程序创建了 4 个进程,这 4 个进程可以并发地执行。 + +

+ +## 2. 线程 + +线程是独立调度的基本单位。 + +一个进程中可以有多个线程,它们共享进程资源。 + +QQ 和浏览器是两个进程,浏览器进程里面有很多线程,例如 HTTP 请求线程、事件响应线程、渲染线程等等,线程的并发执行使得在浏览器中点击一个新链接从而发起 HTTP 请求时,浏览器还可以响应用户的其它事件。 + +

+ +## 3. 区别 + +Ⅰ 拥有资源 + +进程是资源分配的基本单位,但是线程不拥有资源,线程可以访问隶属进程的资源。 + +Ⅱ 调度 + +线程是独立调度的基本单位,在同一进程中,线程的切换不会引起进程切换,从一个进程中的线程切换到另一个进程中的线程时,会引起进程切换。 + +Ⅲ 系统开销 + +由于创建或撤销进程时,系统都要为之分配或回收资源,如内存空间、I/O 设备等,所付出的开销远大于创建或撤销线程时的开销。类似地,在进行进程切换时,涉及当前执行进程 CPU 环境的保存及新调度进程 CPU 环境的设置,而线程切换时只需保存和设置少量寄存器内容,开销很小。 + +Ⅳ 通信方面 + +线程间可以通过直接读写同一进程中的数据进行通信,但是进程通信需要借助 IPC。 + +# 进程状态的切换 + +

+ +- 就绪状态(ready):等待被调度 +- 运行状态(running) +- 阻塞状态(waiting):等待资源 + +应该注意以下内容: + +- 只有就绪态和运行态可以相互转换,其它的都是单向转换。就绪状态的进程通过调度算法从而获得 CPU 时间,转为运行状态;而运行状态的进程,在分配给它的 CPU 时间片用完之后就会转为就绪状态,等待下一次调度。 +- 阻塞状态是缺少需要的资源从而由运行状态转换而来,但是该资源不包括 CPU 时间,缺少 CPU 时间会从运行态转换为就绪态。 + +# 进程调度算法 + +不同环境的调度算法目标不同,因此需要针对不同环境来讨论调度算法。 + +## 1. 批处理系统 + +批处理系统没有太多的用户操作,在该系统中,调度算法目标是保证吞吐量和周转时间(从提交到终止的时间)。 + +**1.1 先来先服务 first-come first-serverd(FCFS)** + +非抢占式的调度算法,按照请求的顺序进行调度。 + +有利于长作业,但不利于短作业,因为短作业必须一直等待前面的长作业执行完毕才能执行,而长作业又需要执行很长时间,造成了短作业等待时间过长。 + +**1.2 短作业优先 shortest job first(SJF)** + +非抢占式的调度算法,按估计运行时间最短的顺序进行调度。 + +长作业有可能会饿死,处于一直等待短作业执行完毕的状态。因为如果一直有短作业到来,那么长作业永远得不到调度。 + +**1.3 最短剩余时间优先 shortest remaining time next(SRTN)** + +最短作业优先的抢占式版本,按剩余运行时间的顺序进行调度。 当一个新的作业到达时,其整个运行时间与当前进程的剩余时间作比较。如果新的进程需要的时间更少,则挂起当前进程,运行新的进程。否则新的进程等待。 + +## 2. 交互式系统 + +交互式系统有大量的用户交互操作,在该系统中调度算法的目标是快速地进行响应。 + +**2.1 时间片轮转** + +将所有就绪进程按 FCFS 的原则排成一个队列,每次调度时,把 CPU 时间分配给队首进程,该进程可以执行一个时间片。当时间片用完时,由计时器发出时钟中断,调度程序便停止该进程的执行,并将它送往就绪队列的末尾,同时继续把 CPU 时间分配给队首的进程。 + +时间片轮转算法的效率和时间片的大小有很大关系: + +- 因为进程切换都要保存进程的信息并且载入新进程的信息,如果时间片太小,会导致进程切换得太频繁,在进程切换上就会花过多时间。 +- 而如果时间片过长,那么实时性就不能得到保证。 + +

+ +**2.2 优先级调度** + +为每个进程分配一个优先级,按优先级进行调度。 + +为了防止低优先级的进程永远等不到调度,可以随着时间的推移增加等待进程的优先级。 + +**2.3 多级反馈队列** + +一个进程需要执行 100 个时间片,如果采用时间片轮转调度算法,那么需要交换 100 次。 + +多级队列是为这种需要连续执行多个时间片的进程考虑,它设置了多个队列,每个队列时间片大小都不同,例如 1,2,4,8,..。进程在第一个队列没执行完,就会被移到下一个队列。这种方式下,之前的进程只需要交换 7 次。 + +每个队列优先权也不同,最上面的优先权最高。因此只有上一个队列没有进程在排队,才能调度当前队列上的进程。 + +可以将这种调度算法看成是时间片轮转调度算法和优先级调度算法的结合。 + +

+ +## 3. 实时系统 + +实时系统要求一个请求在一个确定时间内得到响应。 + +分为硬实时和软实时,前者必须满足绝对的截止时间,后者可以容忍一定的超时。 + +# 进程同步 + +## 1. 临界区 + +对临界资源进行访问的那段代码称为临界区。 + +为了互斥访问临界资源,每个进程在进入临界区之前,需要先进行检查。 + +```html +// entry section +// critical section; +// exit section +``` + +## 2. 同步与互斥 + +- 同步:多个进程因为合作产生的直接制约关系,使得进程有一定的先后执行关系。 +- 互斥:多个进程在同一时刻只有一个进程能进入临界区。 + +## 3. 信号量 + +信号量(Semaphore)是一个整型变量,可以对其执行 down 和 up 操作,也就是常见的 P 和 V 操作。 + +- **down** : 如果信号量大于 0 ,执行 -1 操作;如果信号量等于 0,进程睡眠,等待信号量大于 0; +- **up** :对信号量执行 +1 操作,唤醒睡眠的进程让其完成 down 操作。 + +down 和 up 操作需要被设计成原语,不可分割,通常的做法是在执行这些操作的时候屏蔽中断。 + +如果信号量的取值只能为 0 或者 1,那么就成为了 **互斥量(Mutex)** ,0 表示临界区已经加锁,1 表示临界区解锁。 + +```c +typedef int semaphore; +semaphore mutex = 1; +void P1() { + down(&mutex); + // 临界区 + up(&mutex); +} + +void P2() { + down(&mutex); + // 临界区 + up(&mutex); +} +``` + + **使用信号量实现生产者-消费者问题**
+ +问题描述:使用一个缓冲区来保存物品,只有缓冲区没有满,生产者才可以放入物品;只有缓冲区不为空,消费者才可以拿走物品。 + +因为缓冲区属于临界资源,因此需要使用一个互斥量 mutex 来控制对缓冲区的互斥访问。 + +为了同步生产者和消费者的行为,需要记录缓冲区中物品的数量。数量可以使用信号量来进行统计,这里需要使用两个信号量:empty 记录空缓冲区的数量,full 记录满缓冲区的数量。其中,empty 信号量是在生产者进程中使用,当 empty 不为 0 时,生产者才可以放入物品;full 信号量是在消费者进程中使用,当 full 信号量不为 0 时,消费者才可以取走物品。 + +注意,不能先对缓冲区进行加锁,再测试信号量。也就是说,不能先执行 down(mutex) 再执行 down(empty)。如果这么做了,那么可能会出现这种情况:生产者对缓冲区加锁后,执行 down(empty) 操作,发现 empty = 0,此时生产者睡眠。消费者不能进入临界区,因为生产者对缓冲区加锁了,消费者就无法执行 up(empty) 操作,empty 永远都为 0,导致生产者永远等待下,不会释放锁,消费者因此也会永远等待下去。 + +```c +#define N 100 +typedef int semaphore; +semaphore mutex = 1; +semaphore empty = N; +semaphore full = 0; + +void producer() { + while(TRUE) { + int item = produce_item(); + down(&empty); + down(&mutex); + insert_item(item); + up(&mutex); + up(&full); + } +} + +void consumer() { + while(TRUE) { + down(&full); + down(&mutex); + int item = remove_item(); + consume_item(item); + up(&mutex); + up(&empty); + } +} +``` + +## 4. 管程 + +使用信号量机制实现的生产者消费者问题需要客户端代码做很多控制,而管程把控制的代码独立出来,不仅不容易出错,也使得客户端代码调用更容易。 + +c 语言不支持管程,下面的示例代码使用了类 Pascal 语言来描述管程。示例代码的管程提供了 insert() 和 remove() 方法,客户端代码通过调用这两个方法来解决生产者-消费者问题。 + +```pascal +monitor ProducerConsumer + integer i; + condition c; + + procedure insert(); + begin + // ... + end; + + procedure remove(); + begin + // ... + end; +end monitor; +``` + +管程有一个重要特性:在一个时刻只能有一个进程使用管程。进程在无法继续执行的时候不能一直占用管程,否则其它进程永远不能使用管程。 + +管程引入了 **条件变量** 以及相关的操作:**wait()** 和 **signal()** 来实现同步操作。对条件变量执行 wait() 操作会导致调用进程阻塞,把管程让出来给另一个进程持有。signal() 操作用于唤醒被阻塞的进程。 + + **使用管程实现生产者-消费者问题**
+ +```pascal +// 管程 +monitor ProducerConsumer + condition full, empty; + integer count := 0; + condition c; + + procedure insert(item: integer); + begin + if count = N then wait(full); + insert_item(item); + count := count + 1; + if count = 1 then signal(empty); + end; + + function remove: integer; + begin + if count = 0 then wait(empty); + remove = remove_item; + count := count - 1; + if count = N -1 then signal(full); + end; +end monitor; + +// 生产者客户端 +procedure producer +begin + while true do + begin + item = produce_item; + ProducerConsumer.insert(item); + end +end; + +// 消费者客户端 +procedure consumer +begin + while true do + begin + item = ProducerConsumer.remove; + consume_item(item); + end +end; +``` + +# 经典同步问题 + +生产者和消费者问题前面已经讨论过了。 + +## 1. 哲学家进餐问题 + +

+ +五个哲学家围着一张圆桌,每个哲学家面前放着食物。哲学家的生活有两种交替活动:吃饭以及思考。当一个哲学家吃饭时,需要先拿起自己左右两边的两根筷子,并且一次只能拿起一根筷子。 + +下面是一种错误的解法,如果所有哲学家同时拿起左手边的筷子,那么所有哲学家都在等待其它哲学家吃完并释放自己手中的筷子,导致死锁。 + +```c +#define N 5 + +void philosopher(int i) { + while(TRUE) { + think(); + take(i); // 拿起左边的筷子 + take((i+1)%N); // 拿起右边的筷子 + eat(); + put(i); + put((i+1)%N); + } +} +``` + +为了防止死锁的发生,可以设置两个条件: + +- 必须同时拿起左右两根筷子; +- 只有在两个邻居都没有进餐的情况下才允许进餐。 + +```c +#define N 5 +#define LEFT (i + N - 1) % N // 左邻居 +#define RIGHT (i + 1) % N // 右邻居 +#define THINKING 0 +#define HUNGRY 1 +#define EATING 2 +typedef int semaphore; +int state[N]; // 跟踪每个哲学家的状态 +semaphore mutex = 1; // 临界区的互斥,临界区是 state 数组,对其修改需要互斥 +semaphore s[N]; // 每个哲学家一个信号量 + +void philosopher(int i) { + while(TRUE) { + think(i); + take_two(i); + eat(i); + put_two(i); + } +} + +void take_two(int i) { + down(&mutex); + state[i] = HUNGRY; + check(i); + up(&mutex); + down(&s[i]); // 只有收到通知之后才可以开始吃,否则会一直等下去 +} + +void put_two(i) { + down(&mutex); + state[i] = THINKING; + check(LEFT); // 尝试通知左右邻居,自己吃完了,你们可以开始吃了 + check(RIGHT); + up(&mutex); +} + +void eat(int i) { + down(&mutex); + state[i] = EATING; + up(&mutex); +} + +// 检查两个邻居是否都没有用餐,如果是的话,就 up(&s[i]),使得 down(&s[i]) 能够得到通知并继续执行 +void check(i) { + if(state[i] == HUNGRY && state[LEFT] != EATING && state[RIGHT] !=EATING) { + state[i] = EATING; + up(&s[i]); + } +} +``` + +## 2. 读者-写者问题 + +允许多个进程同时对数据进行读操作,但是不允许读和写以及写和写操作同时发生。 + +一个整型变量 count 记录在对数据进行读操作的进程数量,一个互斥量 count_mutex 用于对 count 加锁,一个互斥量 data_mutex 用于对读写的数据加锁。 + +```c +typedef int semaphore; +semaphore count_mutex = 1; +semaphore data_mutex = 1; +int count = 0; + +void reader() { + while(TRUE) { + down(&count_mutex); + count++; + if(count == 1) down(&data_mutex); // 第一个读者需要对数据进行加锁,防止写进程访问 + up(&count_mutex); + read(); + down(&count_mutex); + count--; + if(count == 0) up(&data_mutex); + up(&count_mutex); + } +} + +void writer() { + while(TRUE) { + down(&data_mutex); + write(); + up(&data_mutex); + } +} +``` + +以下内容由 [@Bandi Yugandhar](https://github.com/yugandharbandi) 提供。 + +The first case may result Writer to starve. This case favous Writers i.e no writer, once added to the queue, shall be kept waiting longer than absolutely necessary(only when there are readers that entered the queue before the writer). + +```c +int readcount, writecount; //(initial value = 0) +semaphore rmutex, wmutex, readLock, resource; //(initial value = 1) + +//READER +void reader() { + + down(&readLock); // reader is trying to enter + down(&rmutex); // lock to increase readcount + readcount++; + if (readcount == 1) + down(&resource); //if you are the first reader then lock the resource + up(&rmutex); //release for other readers + up(&readLock); //Done with trying to access the resource + + +//reading is performed + + + down(&rmutex); //reserve exit section - avoids race condition with readers + readcount--; //indicate you're leaving + if (readcount == 0) //checks if you are last reader leaving + up(&resource); //if last, you must release the locked resource + up(&rmutex); //release exit section for other readers +} + +//WRITER +void writer() { + + down(&wmutex); //reserve entry section for writers - avoids race conditions + writecount++; //report yourself as a writer entering + if (writecount == 1) //checks if you're first writer + down(&readLock); //if you're first, then you must lock the readers out. Prevent them from trying to enter CS + up(&wmutex); //release entry section + + + down(&resource); //reserve the resource for yourself - prevents other writers from simultaneously editing the shared resource + //writing is performed + up(&resource); //release file + + + down(&wmutex); //reserve exit section + writecount--; //indicate you're leaving + if (writecount == 0) //checks if you're the last writer + up(&readLock); //if you're last writer, you must unlock the readers. Allows them to try enter CS for reading + up(&wmutex); //release exit section +} +``` + +We can observe that every reader is forced to acquire ReadLock. On the otherhand, writers doesn’t need to lock individually. Once the first writer locks the ReadLock, it will be released only when there is no writer left in the queue. + +From the both cases we observed that either reader or writer has to starve. Below solutionadds the constraint that no thread shall be allowed to starve; that is, the operation of obtaining a lock on the shared data will always terminate in a bounded amount of time. + +```source-c +int readCount; // init to 0; number of readers currently accessing resource + +// all semaphores initialised to 1 +Semaphore resourceAccess; // controls access (read/write) to the resource +Semaphore readCountAccess; // for syncing changes to shared variable readCount +Semaphore serviceQueue; // FAIRNESS: preserves ordering of requests (signaling must be FIFO) + +void writer() +{ + down(&serviceQueue); // wait in line to be servicexs + // + down(&resourceAccess); // request exclusive access to resource + // + up(&serviceQueue); // let next in line be serviced + + // + writeResource(); // writing is performed + // + + // + up(&resourceAccess); // release resource access for next reader/writer + // +} + +void reader() +{ + down(&serviceQueue); // wait in line to be serviced + down(&readCountAccess); // request exclusive access to readCount + // + if (readCount == 0) // if there are no readers already reading: + down(&resourceAccess); // request resource access for readers (writers blocked) + readCount++; // update count of active readers + // + up(&serviceQueue); // let next in line be serviced + up(&readCountAccess); // release access to readCount + + // + readResource(); // reading is performed + // + + down(&readCountAccess); // request exclusive access to readCount + // + readCount--; // update count of active readers + if (readCount == 0) // if there are no readers left: + up(&resourceAccess); // release resource access for all + // + up(&readCountAccess); // release access to readCount +} + +``` + +# 进程通信 + +进程同步与进程通信很容易混淆,它们的区别在于: + +- 进程同步:控制多个进程按一定顺序执行; +- 进程通信:进程间传输信息。 + +进程通信是一种手段,而进程同步是一种目的。也可以说,为了能够达到进程同步的目的,需要让进程进行通信,传输一些进程同步所需要的信息。 + +## 1. 管道 + +管道是通过调用 pipe 函数创建的,fd[0] 用于读,fd[1] 用于写。 + +```c +#include +int pipe(int fd[2]); +``` + +它具有以下限制: + +- 只支持半双工通信(单向交替传输); +- 只能在父子进程或者兄弟进程中使用。 + +

+ +## 2. FIFO + +也称为命名管道,去除了管道只能在父子进程中使用的限制。 + +```c +#include +int mkfifo(const char *path, mode_t mode); +int mkfifoat(int fd, const char *path, mode_t mode); +``` + +FIFO 常用于客户-服务器应用程序中,FIFO 用作汇聚点,在客户进程和服务器进程之间传递数据。 + +

+ +## 3. 消息队列 + +相比于 FIFO,消息队列具有以下优点: + +- 消息队列可以独立于读写进程存在,从而避免了 FIFO 中同步管道的打开和关闭时可能产生的困难; +- 避免了 FIFO 的同步阻塞问题,不需要进程自己提供同步方法; +- 读进程可以根据消息类型有选择地接收消息,而不像 FIFO 那样只能默认地接收。 + +## 4. 信号量 + +它是一个计数器,用于为多个进程提供对共享数据对象的访问。 + +## 5. 共享存储 + +允许多个进程共享一个给定的存储区。因为数据不需要在进程之间复制,所以这是最快的一种 IPC。 + +需要使用信号量用来同步对共享存储的访问。 + +多个进程可以将同一个文件映射到它们的地址空间从而实现共享内存。另外 XSI 共享内存不是使用文件,而是使用内存的匿名段。 + +## 6. 套接字 + +与其它通信机制不同的是,它可用于不同机器间的进程通信。 + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" new file mode 100644 index 00000000..e0c6a7ac --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\223\215\344\275\234\347\263\273\347\273\237/\351\241\265\351\235\242\347\275\256\346\215\242\347\256\227\346\263\225.md" @@ -0,0 +1,129 @@ + +* [基本特征](#基本特征) + * [1. 并发](#1-并发) + * [2. 共享](#2-共享) + * [3. 虚拟](#3-虚拟) + * [4. 异步](#4-异步) +* [基本功能](#基本功能) + * [1. 进程管理](#1-进程管理) + * [2. 内存管理](#2-内存管理) + * [3. 文件管理](#3-文件管理) + * [4. 设备管理](#4-设备管理) +* [系统调用](#系统调用) +* [大内核和微内核](#大内核和微内核) + * [1. 大内核](#1-大内核) + * [2. 微内核](#2-微内核) +* [中断分类](#中断分类) + * [1. 外中断](#1-外中断) + * [2. 异常](#2-异常) + * [3. 陷入](#3-陷入) + + + +# 基本特征 + +## 1. 并发 + +并发是指宏观上在一段时间内能同时运行多个程序,而并行则指同一时刻能运行多个指令。 + +并行需要硬件支持,如多流水线、多核处理器或者分布式计算系统。 + +操作系统通过引入进程和线程,使得程序能够并发运行。 + +## 2. 共享 + +共享是指系统中的资源可以被多个并发进程共同使用。 + +有两种共享方式:互斥共享和同时共享。 + +互斥共享的资源称为临界资源,例如打印机等,在同一时刻只允许一个进程访问,需要用同步机制来实现互斥访问。 + +## 3. 虚拟 + +虚拟技术把一个物理实体转换为多个逻辑实体。 + +主要有两种虚拟技术:时(时间)分复用技术和空(空间)分复用技术。 + +多个进程能在同一个处理器上并发执行使用了时分复用技术,让每个进程轮流占用处理器,每次只执行一小个时间片并快速切换。 + +虚拟内存使用了空分复用技术,它将物理内存抽象为地址空间,每个进程都有各自的地址空间。地址空间的页被映射到物理内存,地址空间的页并不需要全部在物理内存中,当使用到一个没有在物理内存的页时,执行页面置换算法,将该页置换到内存中。 + +## 4. 异步 + +异步指进程不是一次性执行完毕,而是走走停停,以不可知的速度向前推进。 + +# 基本功能 + +## 1. 进程管理 + +进程控制、进程同步、进程通信、死锁处理、处理机调度等。 + +## 2. 内存管理 + +内存分配、地址映射、内存保护与共享、虚拟内存等。 + +## 3. 文件管理 + +文件存储空间的管理、目录管理、文件读写管理和保护等。 + +## 4. 设备管理 + +完成用户的 I/O 请求,方便用户使用各种设备,并提高设备的利用率。 + +主要包括缓冲管理、设备分配、设备处理、虛拟设备等。 + +# 系统调用 + +如果一个进程在用户态需要使用内核态的功能,就进行系统调用从而陷入内核,由操作系统代为完成。 + +

+ +Linux 的系统调用主要有以下这些: + +| Task | Commands | +| :---: | --- | +| 进程控制 | fork(); exit(); wait(); | +| 进程通信 | pipe(); shmget(); mmap(); | +| 文件操作 | open(); read(); write(); | +| 设备操作 | ioctl(); read(); write(); | +| 信息维护 | getpid(); alarm(); sleep(); | +| 安全 | chmod(); umask(); chown(); | + +# 大内核和微内核 + +## 1. 大内核 + +大内核是将操作系统功能作为一个紧密结合的整体放到内核。 + +由于各模块共享信息,因此有很高的性能。 + +## 2. 微内核 + +由于操作系统不断复杂,因此将一部分操作系统功能移出内核,从而降低内核的复杂性。移出的部分根据分层的原则划分成若干服务,相互独立。 + +在微内核结构下,操作系统被划分成小的、定义良好的模块,只有微内核这一个模块运行在内核态,其余模块运行在用户态。 + +因为需要频繁地在用户态和核心态之间进行切换,所以会有一定的性能损失。 + +

+ +# 中断分类 + +## 1. 外中断 + +由 CPU 执行指令以外的事件引起,如 I/O 完成中断,表示设备输入/输出处理已经完成,处理器能够发送下一个输入/输出请求。此外还有时钟中断、控制台中断等。 + +## 2. 异常 + +由 CPU 执行指令的内部事件引起,如非法操作码、地址越界、算术溢出等。 + +## 3. 陷入 + +在用户程序中使用系统调用。 + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\346\225\260\346\215\256\347\273\223\346\236\204\347\256\227\346\263\225\347\254\224\350\257\225\351\242\230\346\261\207\346\200\273.pdf" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\225\260\346\215\256\347\273\223\346\236\204\347\256\227\346\263\225\347\254\224\350\257\225\351\242\230\346\261\207\346\200\273.pdf" new file mode 100644 index 00000000..a2ff33aa Binary files /dev/null and "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\225\260\346\215\256\347\273\223\346\236\204\347\256\227\346\263\225\347\254\224\350\257\225\351\242\230\346\261\207\346\200\273.pdf" differ diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\346\234\200\345\260\217\347\224\237\346\210\220\346\240\221\347\256\227\346\263\225\350\256\262\350\247\243.ppt" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\346\234\200\345\260\217\347\224\237\346\210\220\346\240\221\347\256\227\346\263\225\350\256\262\350\247\243.ppt" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\346\234\200\345\260\217\347\224\237\346\210\220\346\240\221\347\256\227\346\263\225\350\256\262\350\247\243.ppt" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\346\234\200\345\260\217\347\224\237\346\210\220\346\240\221\347\256\227\346\263\225\350\256\262\350\247\243.ppt" diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\350\203\214\345\214\205\344\271\235\350\256\262-2.0.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\203\214\345\214\205\344\271\235\350\256\262-2.0.zip" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\350\203\214\345\214\205\344\271\235\350\256\262-2.0.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\350\203\214\345\214\205\344\271\235\350\256\262-2.0.zip" diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" new file mode 100644 index 00000000..fdd2de8a --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \344\274\240\350\276\223\345\261\202.md" @@ -0,0 +1,169 @@ + +* [UDP 和 TCP 的特点](#udp-和-tcp-的特点) +* [UDP 首部格式](#udp-首部格式) +* [TCP 首部格式](#tcp-首部格式) +* [TCP 的三次握手](#tcp-的三次握手) +* [TCP 的四次挥手](#tcp-的四次挥手) +* [TCP 可靠传输](#tcp-可靠传输) +* [TCP 滑动窗口](#tcp-滑动窗口) +* [TCP 流量控制](#tcp-流量控制) +* [TCP 拥塞控制](#tcp-拥塞控制) + * [1. 慢开始与拥塞避免](#1-慢开始与拥塞避免) + * [2. 快重传与快恢复](#2-快重传与快恢复) + + + +网络层只把分组发送到目的主机,但是真正通信的并不是主机而是主机中的进程。传输层提供了进程间的逻辑通信,传输层向高层用户屏蔽了下面网络层的核心细节,使应用程序看起来像是在两个传输层实体之间有一条端到端的逻辑通信信道。 + +# UDP 和 TCP 的特点 + +- 用户数据报协议 UDP(User Datagram Protocol)是无连接的,尽最大可能交付,没有拥塞控制,面向报文(对于应用程序传下来的报文不合并也不拆分,只是添加 UDP 首部),支持一对一、一对多、多对一和多对多的交互通信。 + +- 传输控制协议 TCP(Transmission Control Protocol)是面向连接的,提供可靠交付,有流量控制,拥塞控制,提供全双工通信,面向字节流(把应用层传下来的报文看成字节流,把字节流组织成大小不等的数据块),每一条 TCP 连接只能是点对点的(一对一)。 + +# UDP 首部格式 + +

+ +首部字段只有 8 个字节,包括源端口、目的端口、长度、检验和。12 字节的伪首部是为了计算检验和临时添加的。 + +# TCP 首部格式 + +

+ +- **序号** :用于对字节流进行编号,例如序号为 301,表示第一个字节的编号为 301,如果携带的数据长度为 100 字节,那么下一个报文段的序号应为 401。 + +- **确认号** :期望收到的下一个报文段的序号。例如 B 正确收到 A 发送来的一个报文段,序号为 501,携带的数据长度为 200 字节,因此 B 期望下一个报文段的序号为 701,B 发送给 A 的确认报文段中确认号就为 701。 + +- **数据偏移** :指的是数据部分距离报文段起始处的偏移量,实际上指的是首部的长度。 + +- **确认 ACK** :当 ACK=1 时确认号字段有效,否则无效。TCP 规定,在连接建立后所有传送的报文段都必须把 ACK 置 1。 + +- **同步 SYN** :在连接建立时用来同步序号。当 SYN=1,ACK=0 时表示这是一个连接请求报文段。若对方同意建立连接,则响应报文中 SYN=1,ACK=1。 + +- **终止 FIN** :用来释放一个连接,当 FIN=1 时,表示此报文段的发送方的数据已发送完毕,并要求释放连接。 + +- **窗口** :窗口值作为接收方让发送方设置其发送窗口的依据。之所以要有这个限制,是因为接收方的数据缓存空间是有限的。 + +# TCP 的三次握手 + +

+ +假设 A 为客户端,B 为服务器端。 + +- 首先 B 处于 LISTEN(监听)状态,等待客户的连接请求。 + +- A 向 B 发送连接请求报文,SYN=1,ACK=0,选择一个初始的序号 x。 + +- B 收到连接请求报文,如果同意建立连接,则向 A 发送连接确认报文,SYN=1,ACK=1,确认号为 x+1,同时也选择一个初始的序号 y。 + +- A 收到 B 的连接确认报文后,还要向 B 发出确认,确认号为 y+1,序号为 x+1。 + +- B 收到 A 的确认后,连接建立。 + +**三次握手的原因** + +第三次握手是为了防止失效的连接请求到达服务器,让服务器错误打开连接。 + +客户端发送的连接请求如果在网络中滞留,那么就会隔很长一段时间才能收到服务器端发回的连接确认。客户端等待一个超时重传时间之后,就会重新请求连接。但是这个滞留的连接请求最后还是会到达服务器,如果不进行三次握手,那么服务器就会打开两个连接。如果有第三次握手,客户端会忽略服务器之后发送的对滞留连接请求的连接确认,不进行第三次握手,因此就不会再次打开连接。 + +# TCP 的四次挥手 + +

+ +以下描述不讨论序号和确认号,因为序号和确认号的规则比较简单。并且不讨论 ACK,因为 ACK 在连接建立之后都为 1。 + +- A 发送连接释放报文,FIN=1。 + +- B 收到之后发出确认,此时 TCP 属于半关闭状态,B 能向 A 发送数据但是 A 不能向 B 发送数据。 + +- 当 B 不再需要连接时,发送连接释放报文,FIN=1。 + +- A 收到后发出确认,进入 TIME-WAIT 状态,等待 2 MSL(最大报文存活时间)后释放连接。 + +- B 收到 A 的确认后释放连接。 + +**四次挥手的原因** + +客户端发送了 FIN 连接释放报文之后,服务器收到了这个报文,就进入了 CLOSE-WAIT 状态。这个状态是为了让服务器端发送还未传送完毕的数据,传送完毕之后,服务器会发送 FIN 连接释放报文。 + +**TIME_WAIT** + +客户端接收到服务器端的 FIN 报文后进入此状态,此时并不是直接进入 CLOSED 状态,还需要等待一个时间计时器设置的时间 2MSL。这么做有两个理由: + +- 确保最后一个确认报文能够到达。如果 B 没收到 A 发送来的确认报文,那么就会重新发送连接释放请求报文,A 等待一段时间就是为了处理这种情况的发生。 + +- 等待一段时间是为了让本连接持续时间内所产生的所有报文都从网络中消失,使得下一个新的连接不会出现旧的连接请求报文。 + +# TCP 可靠传输 + +TCP 使用超时重传来实现可靠传输:如果一个已经发送的报文段在超时时间内没有收到确认,那么就重传这个报文段。 + +一个报文段从发送再到接收到确认所经过的时间称为往返时间 RTT,加权平均往返时间 RTTs 计算如下: + +

+其中,0 ≤ a < 1,RTTs 随着 a 的增加更容易受到 RTT 的影响。 + +超时时间 RTO 应该略大于 RTTs,TCP 使用的超时时间计算如下: + +

+其中 RTTd 为偏差的加权平均值。 + +# TCP 滑动窗口 + +窗口是缓存的一部分,用来暂时存放字节流。发送方和接收方各有一个窗口,接收方通过 TCP 报文段中的窗口字段告诉发送方自己的窗口大小,发送方根据这个值和其它信息设置自己的窗口大小。 + +发送窗口内的字节都允许被发送,接收窗口内的字节都允许被接收。如果发送窗口左部的字节已经发送并且收到了确认,那么就将发送窗口向右滑动一定距离,直到左部第一个字节不是已发送并且已确认的状态;接收窗口的滑动类似,接收窗口左部字节已经发送确认并交付主机,就向右滑动接收窗口。 + +接收窗口只会对窗口内最后一个按序到达的字节进行确认,例如接收窗口已经收到的字节为 {31, 34, 35},其中 {31} 按序到达,而 {34, 35} 就不是,因此只对字节 31 进行确认。发送方得到一个字节的确认之后,就知道这个字节之前的所有字节都已经被接收。 + +

+ +# TCP 流量控制 + +流量控制是为了控制发送方发送速率,保证接收方来得及接收。 + +接收方发送的确认报文中的窗口字段可以用来控制发送方窗口大小,从而影响发送方的发送速率。将窗口字段设置为 0,则发送方不能发送数据。 + +# TCP 拥塞控制 + +如果网络出现拥塞,分组将会丢失,此时发送方会继续重传,从而导致网络拥塞程度更高。因此当出现拥塞时,应当控制发送方的速率。这一点和流量控制很像,但是出发点不同。流量控制是为了让接收方能来得及接收,而拥塞控制是为了降低整个网络的拥塞程度。 + +

+ +TCP 主要通过四个算法来进行拥塞控制:慢开始、拥塞避免、快重传、快恢复。 + +发送方需要维护一个叫做拥塞窗口(cwnd)的状态变量,注意拥塞窗口与发送方窗口的区别:拥塞窗口只是一个状态变量,实际决定发送方能发送多少数据的是发送方窗口。 + +为了便于讨论,做如下假设: + +- 接收方有足够大的接收缓存,因此不会发生流量控制; +- 虽然 TCP 的窗口基于字节,但是这里设窗口的大小单位为报文段。 + +

+ +## 1. 慢开始与拥塞避免 + +发送的最初执行慢开始,令 cwnd = 1,发送方只能发送 1 个报文段;当收到确认后,将 cwnd 加倍,因此之后发送方能够发送的报文段数量为:2、4、8 ... + +注意到慢开始每个轮次都将 cwnd 加倍,这样会让 cwnd 增长速度非常快,从而使得发送方发送的速度增长速度过快,网络拥塞的可能性也就更高。设置一个慢开始门限 ssthresh,当 cwnd >= ssthresh 时,进入拥塞避免,每个轮次只将 cwnd 加 1。 + +如果出现了超时,则令 ssthresh = cwnd / 2,然后重新执行慢开始。 + +## 2. 快重传与快恢复 + +在接收方,要求每次接收到报文段都应该对最后一个已收到的有序报文段进行确认。例如已经接收到 M1 和 M2,此时收到 M4,应当发送对 M2 的确认。 + +在发送方,如果收到三个重复确认,那么可以知道下一个报文段丢失,此时执行快重传,立即重传下一个报文段。例如收到三个 M2,则 M3 丢失,立即重传 M3。 + +在这种情况下,只是丢失个别报文段,而不是网络拥塞。因此执行快恢复,令 ssthresh = cwnd / 2 ,cwnd = ssthresh,注意到此时直接进入拥塞避免。 + +慢开始和快恢复的快慢指的是 cwnd 的设定值,而不是 cwnd 的增长速率。慢开始 cwnd 设定为 1,而快恢复 cwnd 设定为 ssthresh。 + + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" new file mode 100644 index 00000000..213f43f8 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \345\272\224\347\224\250\345\261\202.md" @@ -0,0 +1,173 @@ + +* [域名系统](#域名系统) +* [文件传送协议](#文件传送协议) +* [动态主机配置协议](#动态主机配置协议) +* [远程登录协议](#远程登录协议) +* [电子邮件协议](#电子邮件协议) + * [1. SMTP](#1-smtp) + * [2. POP3](#2-pop3) + * [3. IMAP](#3-imap) +* [常用端口](#常用端口) +* [Web 页面请求过程](#web-页面请求过程) + * [1. DHCP 配置主机信息](#1-dhcp-配置主机信息) + * [2. ARP 解析 MAC 地址](#2-arp-解析-mac-地址) + * [3. DNS 解析域名](#3-dns-解析域名) + * [4. HTTP 请求页面](#4-http-请求页面) + + + +# 域名系统 + +DNS 是一个分布式数据库,提供了主机名和 IP 地址之间相互转换的服务。这里的分布式数据库是指,每个站点只保留它自己的那部分数据。 + +域名具有层次结构,从上到下依次为:根域名、顶级域名、二级域名。 + +

+ +DNS 可以使用 UDP 或者 TCP 进行传输,使用的端口号都为 53。大多数情况下 DNS 使用 UDP 进行传输,这就要求域名解析器和域名服务器都必须自己处理超时和重传从而保证可靠性。在两种情况下会使用 TCP 进行传输: + +- 如果返回的响应超过的 512 字节(UDP 最大只支持 512 字节的数据)。 +- 区域传送(区域传送是主域名服务器向辅助域名服务器传送变化的那部分数据)。 + +# 文件传送协议 + +FTP 使用 TCP 进行连接,它需要两个连接来传送一个文件: + +- 控制连接:服务器打开端口号 21 等待客户端的连接,客户端主动建立连接后,使用这个连接将客户端的命令传送给服务器,并传回服务器的应答。 +- 数据连接:用来传送一个文件数据。 + +根据数据连接是否是服务器端主动建立,FTP 有主动和被动两种模式: + +- 主动模式:服务器端主动建立数据连接,其中服务器端的端口号为 20,客户端的端口号随机,但是必须大于 1024,因为 0\~1023 是熟知端口号。 + +

+ +- 被动模式:客户端主动建立数据连接,其中客户端的端口号由客户端自己指定,服务器端的端口号随机。 + +

+ +主动模式要求客户端开放端口号给服务器端,需要去配置客户端的防火墙。被动模式只需要服务器端开放端口号即可,无需客户端配置防火墙。但是被动模式会导致服务器端的安全性减弱,因为开放了过多的端口号。 + +# 动态主机配置协议 + +DHCP (Dynamic Host Configuration Protocol) 提供了即插即用的连网方式,用户不再需要手动配置 IP 地址等信息。 + +DHCP 配置的内容不仅是 IP 地址,还包括子网掩码、网关 IP 地址。 + +DHCP 工作过程如下: + +1. 客户端发送 Discover 报文,该报文的目的地址为 255.255.255.255:67,源地址为 0.0.0.0:68,被放入 UDP 中,该报文被广播到同一个子网的所有主机上。如果客户端和 DHCP 服务器不在同一个子网,就需要使用中继代理。 +2. DHCP 服务器收到 Discover 报文之后,发送 Offer 报文给客户端,该报文包含了客户端所需要的信息。因为客户端可能收到多个 DHCP 服务器提供的信息,因此客户端需要进行选择。 +3. 如果客户端选择了某个 DHCP 服务器提供的信息,那么就发送 Request 报文给该 DHCP 服务器。 +4. DHCP 服务器发送 Ack 报文,表示客户端此时可以使用提供给它的信息。 + +

+ +# 远程登录协议 + +TELNET 用于登录到远程主机上,并且远程主机上的输出也会返回。 + +TELNET 可以适应许多计算机和操作系统的差异,例如不同操作系统系统的换行符定义。 + +# 电子邮件协议 + +一个电子邮件系统由三部分组成:用户代理、邮件服务器以及邮件协议。 + +邮件协议包含发送协议和读取协议,发送协议常用 SMTP,读取协议常用 POP3 和 IMAP。 + +

+ +## 1. SMTP + +SMTP 只能发送 ASCII 码,而互联网邮件扩充 MIME 可以发送二进制文件。MIME 并没有改动或者取代 SMTP,而是增加邮件主体的结构,定义了非 ASCII 码的编码规则。 + +

+ +## 2. POP3 + +POP3 的特点是只要用户从服务器上读取了邮件,就把该邮件删除。但最新版本的 POP3 可以不删除邮件。 + +## 3. IMAP + +IMAP 协议中客户端和服务器上的邮件保持同步,如果不手动删除邮件,那么服务器上的邮件也不会被删除。IMAP 这种做法可以让用户随时随地去访问服务器上的邮件。 + +# 常用端口 + +|应用| 应用层协议 | 端口号 | 传输层协议 | 备注 | +| :---: | :--: | :--: | :--: | :--: | +| 域名解析 | DNS | 53 | UDP/TCP | 长度超过 512 字节时使用 TCP | +| 动态主机配置协议 | DHCP | 67/68 | UDP | | +| 简单网络管理协议 | SNMP | 161/162 | UDP | | +| 文件传送协议 | FTP | 20/21 | TCP | 控制连接 21,数据连接 20 | +| 远程终端协议 | TELNET | 23 | TCP | | +| 超文本传送协议 | HTTP | 80 | TCP | | +| 简单邮件传送协议 | SMTP | 25 | TCP | | +| 邮件读取协议 | POP3 | 110 | TCP | | +| 网际报文存取协议 | IMAP | 143 | TCP | | + +# Web 页面请求过程 + +## 1. DHCP 配置主机信息 + +- 假设主机最开始没有 IP 地址以及其它信息,那么就需要先使用 DHCP 来获取。 + +- 主机生成一个 DHCP 请求报文,并将这个报文放入具有目的端口 67 和源端口 68 的 UDP 报文段中。 + +- 该报文段则被放入在一个具有广播 IP 目的地址(255.255.255.255) 和源 IP 地址(0.0.0.0)的 IP 数据报中。 + +- 该数据报则被放置在 MAC 帧中,该帧具有目的地址 FF:FF:FF:FF:FF:FF,将广播到与交换机连接的所有设备。 + +- 连接在交换机的 DHCP 服务器收到广播帧之后,不断地向上分解得到 IP 数据报、UDP 报文段、DHCP 请求报文,之后生成 DHCP ACK 报文,该报文包含以下信息:IP 地址、DNS 服务器的 IP 地址、默认网关路由器的 IP 地址和子网掩码。该报文被放入 UDP 报文段中,UDP 报文段有被放入 IP 数据报中,最后放入 MAC 帧中。 + +- 该帧的目的地址是请求主机的 MAC 地址,因为交换机具有自学习能力,之前主机发送了广播帧之后就记录了 MAC 地址到其转发接口的交换表项,因此现在交换机就可以直接知道应该向哪个接口发送该帧。 + +- 主机收到该帧后,不断分解得到 DHCP 报文。之后就配置它的 IP 地址、子网掩码和 DNS 服务器的 IP 地址,并在其 IP 转发表中安装默认网关。 + +## 2. ARP 解析 MAC 地址 + +- 主机通过浏览器生成一个 TCP 套接字,套接字向 HTTP 服务器发送 HTTP 请求。为了生成该套接字,主机需要知道网站的域名对应的 IP 地址。 + +- 主机生成一个 DNS 查询报文,该报文具有 53 号端口,因为 DNS 服务器的端口号是 53。 + +- 该 DNS 查询报文被放入目的地址为 DNS 服务器 IP 地址的 IP 数据报中。 + +- 该 IP 数据报被放入一个以太网帧中,该帧将发送到网关路由器。 + +- DHCP 过程只知道网关路由器的 IP 地址,为了获取网关路由器的 MAC 地址,需要使用 ARP 协议。 + +- 主机生成一个包含目的地址为网关路由器 IP 地址的 ARP 查询报文,将该 ARP 查询报文放入一个具有广播目的地址(FF:FF:FF:FF:FF:FF)的以太网帧中,并向交换机发送该以太网帧,交换机将该帧转发给所有的连接设备,包括网关路由器。 + +- 网关路由器接收到该帧后,不断向上分解得到 ARP 报文,发现其中的 IP 地址与其接口的 IP 地址匹配,因此就发送一个 ARP 回答报文,包含了它的 MAC 地址,发回给主机。 + +## 3. DNS 解析域名 + +- 知道了网关路由器的 MAC 地址之后,就可以继续 DNS 的解析过程了。 + +- 网关路由器接收到包含 DNS 查询报文的以太网帧后,抽取出 IP 数据报,并根据转发表决定该 IP 数据报应该转发的路由器。 + +- 因为路由器具有内部网关协议(RIP、OSPF)和外部网关协议(BGP)这两种路由选择协议,因此路由表中已经配置了网关路由器到达 DNS 服务器的路由表项。 + +- 到达 DNS 服务器之后,DNS 服务器抽取出 DNS 查询报文,并在 DNS 数据库中查找待解析的域名。 + +- 找到 DNS 记录之后,发送 DNS 回答报文,将该回答报文放入 UDP 报文段中,然后放入 IP 数据报中,通过路由器反向转发回网关路由器,并经过以太网交换机到达主机。 + +## 4. HTTP 请求页面 + +- 有了 HTTP 服务器的 IP 地址之后,主机就能够生成 TCP 套接字,该套接字将用于向 Web 服务器发送 HTTP GET 报文。 + +- 在生成 TCP 套接字之前,必须先与 HTTP 服务器进行三次握手来建立连接。生成一个具有目的端口 80 的 TCP SYN 报文段,并向 HTTP 服务器发送该报文段。 + +- HTTP 服务器收到该报文段之后,生成 TCP SYN ACK 报文段,发回给主机。 + +- 连接建立之后,浏览器生成 HTTP GET 报文,并交付给 HTTP 服务器。 + +- HTTP 服务器从 TCP 套接字读取 HTTP GET 报文,生成一个 HTTP 响应报文,将 Web 页面内容放入报文主体中,发回给主机。 + +- 浏览器收到 HTTP 响应报文后,抽取出 Web 页面内容,之后进行渲染,显示 Web 页面。 + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" new file mode 100644 index 00000000..82aeffc0 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \346\246\202\350\277\260.md" @@ -0,0 +1,139 @@ + +* [网络的网络](#网络的网络) +* [ISP](#isp) +* [主机之间的通信方式](#主机之间的通信方式) +* [电路交换与分组交换](#电路交换与分组交换) + * [1. 电路交换](#1-电路交换) + * [2. 分组交换](#2-分组交换) +* [时延](#时延) + * [1. 排队时延](#1-排队时延) + * [2. 处理时延](#2-处理时延) + * [3. 传输时延](#3-传输时延) + * [4. 传播时延](#4-传播时延) +* [计算机网络体系结构](#计算机网络体系结构) + * [1. 五层协议](#1-五层协议) + * [2. OSI](#2-osi) + * [3. TCP/IP](#3-tcpip) + * [4. 数据在各层之间的传递过程](#4-数据在各层之间的传递过程) + + + +# 网络的网络 + +网络把主机连接起来,而互连网(internet)是把多种不同的网络连接起来,因此互连网是网络的网络。而互联网(Internet)是全球范围的互连网。 + +

+ +# ISP + +互联网服务提供商 ISP 可以从互联网管理机构获得许多 IP 地址,同时拥有通信线路以及路由器等联网设备,个人或机构向 ISP 缴纳一定的费用就可以接入互联网。 + +

+ +目前的互联网是一种多层次 ISP 结构,ISP 根据覆盖面积的大小分为第一层 ISP、区域 ISP 和接入 ISP。互联网交换点 IXP 允许两个 ISP 直接相连而不用经过第三个 ISP。 + +

+ +# 主机之间的通信方式 + +- 客户-服务器(C/S):客户是服务的请求方,服务器是服务的提供方。 + +

+ +- 对等(P2P):不区分客户和服务器。 + +

+ +# 电路交换与分组交换 + +## 1. 电路交换 + +电路交换用于电话通信系统,两个用户要通信之前需要建立一条专用的物理链路,并且在整个通信过程中始终占用该链路。由于通信的过程中不可能一直在使用传输线路,因此电路交换对线路的利用率很低,往往不到 10%。 + +## 2. 分组交换 + +每个分组都有首部和尾部,包含了源地址和目的地址等控制信息,在同一个传输线路上同时传输多个分组互相不会影响,因此在同一条传输线路上允许同时传输多个分组,也就是说分组交换不需要占用传输线路。 + +在一个邮局通信系统中,邮局收到一份邮件之后,先存储下来,然后把相同目的地的邮件一起转发到下一个目的地,这个过程就是存储转发过程,分组交换也使用了存储转发过程。 + +# 时延 + +总时延 = 排队时延 + 处理时延 + 传输时延 + 传播时延 + +

+ +## 1. 排队时延 + +分组在路由器的输入队列和输出队列中排队等待的时间,取决于网络当前的通信量。 + +## 2. 处理时延 + +主机或路由器收到分组时进行处理所需要的时间,例如分析首部、从分组中提取数据、进行差错检验或查找适当的路由等。 + +## 3. 传输时延 + +主机或路由器传输数据帧所需要的时间。 + + + +

+ + +其中 l 表示数据帧的长度,v 表示传输速率。 + +## 4. 传播时延 + +电磁波在信道中传播所需要花费的时间,电磁波传播的速度接近光速。 + + + +

+ +其中 l 表示信道长度,v 表示电磁波在信道上的传播速度。 + +# 计算机网络体系结构 + +

+ +## 1. 五层协议 + +- **应用层** :为特定应用程序提供数据传输服务,例如 HTTP、DNS 等协议。数据单位为报文。 + +- **传输层** :为进程提供通用数据传输服务。由于应用层协议很多,定义通用的传输层协议就可以支持不断增多的应用层协议。运输层包括两种协议:传输控制协议 TCP,提供面向连接、可靠的数据传输服务,数据单位为报文段;用户数据报协议 UDP,提供无连接、尽最大努力的数据传输服务,数据单位为用户数据报。TCP 主要提供完整性服务,UDP 主要提供及时性服务。 + +- **网络层** :为主机提供数据传输服务。而传输层协议是为主机中的进程提供数据传输服务。网络层把传输层传递下来的报文段或者用户数据报封装成分组。 + +- **数据链路层** :网络层针对的还是主机之间的数据传输服务,而主机之间可以有很多链路,链路层协议就是为同一链路的主机提供数据传输服务。数据链路层把网络层传下来的分组封装成帧。 + +- **物理层** :考虑的是怎样在传输媒体上传输数据比特流,而不是指具体的传输媒体。物理层的作用是尽可能屏蔽传输媒体和通信手段的差异,使数据链路层感觉不到这些差异。 + +## 2. OSI + +其中表示层和会话层用途如下: + +- **表示层** :数据压缩、加密以及数据描述,这使得应用程序不必关心在各台主机中数据内部格式不同的问题。 + +- **会话层** :建立及管理会话。 + +五层协议没有表示层和会话层,而是将这些功能留给应用程序开发者处理。 + +## 3. TCP/IP + +它只有四层,相当于五层协议中数据链路层和物理层合并为网络接口层。 + +TCP/IP 体系结构不严格遵循 OSI 分层概念,应用层可能会直接使用 IP 层或者网络接口层。 + +

+ +## 4. 数据在各层之间的传递过程 + +在向下的过程中,需要添加下层协议所需要的首部或者尾部,而在向上的过程中不断拆开首部和尾部。 + +路由器只有下面三层协议,因为路由器位于网络核心中,不需要为进程或者应用程序提供服务,因此也就不需要传输层和应用层。 + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" new file mode 100644 index 00000000..7c6b8a16 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\211\251\347\220\206\345\261\202.md" @@ -0,0 +1,26 @@ + +* [通信方式](#通信方式) +* [带通调制](#带通调制) + + + +# 通信方式 + +根据信息在传输线上的传送方向,分为以下三种通信方式: + +- 单工通信:单向传输 +- 半双工通信:双向交替传输 +- 全双工通信:双向同时传输 + +# 带通调制 + +模拟信号是连续的信号,数字信号是离散的信号。带通调制把数字信号转换为模拟信号。 + + + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" new file mode 100644 index 00000000..36685f17 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \347\275\221\347\273\234\345\261\202.md" @@ -0,0 +1,248 @@ + +* [概述](#概述) +* [IP 数据报格式](#ip-数据报格式) +* [IP 地址编址方式](#ip-地址编址方式) + * [1. 分类](#1-分类) + * [2. 子网划分](#2-子网划分) + * [3. 无分类](#3-无分类) +* [地址解析协议 ARP](#地址解析协议-arp) +* [网际控制报文协议 ICMP](#网际控制报文协议-icmp) + * [1. Ping](#1-ping) + * [2. Traceroute](#2-traceroute) +* [虚拟专用网 VPN](#虚拟专用网-vpn) +* [网络地址转换 NAT](#网络地址转换-nat) +* [路由器的结构](#路由器的结构) +* [路由器分组转发流程](#路由器分组转发流程) +* [路由选择协议](#路由选择协议) + * [1. 内部网关协议 RIP](#1-内部网关协议-rip) + * [2. 内部网关协议 OSPF](#2-内部网关协议-ospf) + * [3. 外部网关协议 BGP](#3-外部网关协议-bgp) + + + +# 概述 + +因为网络层是整个互联网的核心,因此应当让网络层尽可能简单。网络层向上只提供简单灵活的、无连接的、尽最大努力交互的数据报服务。 + +使用 IP 协议,可以把异构的物理网络连接起来,使得在网络层看起来好像是一个统一的网络。 + +

+ +与 IP 协议配套使用的还有三个协议: + +- 地址解析协议 ARP(Address Resolution Protocol) +- 网际控制报文协议 ICMP(Internet Control Message Protocol) +- 网际组管理协议 IGMP(Internet Group Management Protocol) + +# IP 数据报格式 + +

+ +- **版本** : 有 4(IPv4)和 6(IPv6)两个值; + +- **首部长度** : 占 4 位,因此最大值为 15。值为 1 表示的是 1 个 32 位字的长度,也就是 4 字节。因为固定部分长度为 20 字节,因此该值最小为 5。如果可选字段的长度不是 4 字节的整数倍,就用尾部的填充部分来填充。 + +- **区分服务** : 用来获得更好的服务,一般情况下不使用。 + +- **总长度** : 包括首部长度和数据部分长度。 + +- **生存时间** :TTL,它的存在是为了防止无法交付的数据报在互联网中不断兜圈子。以路由器跳数为单位,当 TTL 为 0 时就丢弃数据报。 + +- **协议** :指出携带的数据应该上交给哪个协议进行处理,例如 ICMP、TCP、UDP 等。 + +- **首部检验和** :因为数据报每经过一个路由器,都要重新计算检验和,因此检验和不包含数据部分可以减少计算的工作量。 + +- **标识** : 在数据报长度过长从而发生分片的情况下,相同数据报的不同分片具有相同的标识符。 + +- **片偏移** : 和标识符一起,用于发生分片的情况。片偏移的单位为 8 字节。 + +

+ +# IP 地址编址方式 + +IP 地址的编址方式经历了三个历史阶段: + +- 分类 +- 子网划分 +- 无分类 + +## 1. 分类 + +由两部分组成,网络号和主机号,其中不同分类具有不同的网络号长度,并且是固定的。 + +IP 地址 ::= {< 网络号 >, < 主机号 >} + +

+ +## 2. 子网划分 + +通过在主机号字段中拿一部分作为子网号,把两级 IP 地址划分为三级 IP 地址。 + +IP 地址 ::= {< 网络号 >, < 子网号 >, < 主机号 >} + +要使用子网,必须配置子网掩码。一个 B 类地址的默认子网掩码为 255.255.0.0,如果 B 类地址的子网占两个比特,那么子网掩码为 11111111 11111111 11000000 00000000,也就是 255.255.192.0。 + +注意,外部网络看不到子网的存在。 + +## 3. 无分类 + +无分类编址 CIDR 消除了传统 A 类、B 类和 C 类地址以及划分子网的概念,使用网络前缀和主机号来对 IP 地址进行编码,网络前缀的长度可以根据需要变化。 + +IP 地址 ::= {< 网络前缀号 >, < 主机号 >} + +CIDR 的记法上采用在 IP 地址后面加上网络前缀长度的方法,例如 128.14.35.7/20 表示前 20 位为网络前缀。 + +CIDR 的地址掩码可以继续称为子网掩码,子网掩码首 1 长度为网络前缀的长度。 + +一个 CIDR 地址块中有很多地址,一个 CIDR 表示的网络就可以表示原来的很多个网络,并且在路由表中只需要一个路由就可以代替原来的多个路由,减少了路由表项的数量。把这种通过使用网络前缀来减少路由表项的方式称为路由聚合,也称为 **构成超网** 。 + +在路由表中的项目由“网络前缀”和“下一跳地址”组成,在查找时可能会得到不止一个匹配结果,应当采用最长前缀匹配来确定应该匹配哪一个。 + +# 地址解析协议 ARP + +网络层实现主机之间的通信,而链路层实现具体每段链路之间的通信。因此在通信过程中,IP 数据报的源地址和目的地址始终不变,而 MAC 地址随着链路的改变而改变。 + +

+ +ARP 实现由 IP 地址得到 MAC 地址。 + +

+ +每个主机都有一个 ARP 高速缓存,里面有本局域网上的各主机和路由器的 IP 地址到 MAC 地址的映射表。 + +如果主机 A 知道主机 B 的 IP 地址,但是 ARP 高速缓存中没有该 IP 地址到 MAC 地址的映射,此时主机 A 通过广播的方式发送 ARP 请求分组,主机 B 收到该请求后会发送 ARP 响应分组给主机 A 告知其 MAC 地址,随后主机 A 向其高速缓存中写入主机 B 的 IP 地址到 MAC 地址的映射。 + +

+ +# 网际控制报文协议 ICMP + +ICMP 是为了更有效地转发 IP 数据报和提高交付成功的机会。它封装在 IP 数据报中,但是不属于高层协议。 + +

+ +ICMP 报文分为差错报告报文和询问报文。 + +

+ +## 1. Ping + +Ping 是 ICMP 的一个重要应用,主要用来测试两台主机之间的连通性。 + +Ping 的原理是通过向目的主机发送 ICMP Echo 请求报文,目的主机收到之后会发送 Echo 回答报文。Ping 会根据时间和成功响应的次数估算出数据包往返时间以及丢包率。 + +## 2. Traceroute + +Traceroute 是 ICMP 的另一个应用,用来跟踪一个分组从源点到终点的路径。 + +Traceroute 发送的 IP 数据报封装的是无法交付的 UDP 用户数据报,并由目的主机发送终点不可达差错报告报文。 + +- 源主机向目的主机发送一连串的 IP 数据报。第一个数据报 P1 的生存时间 TTL 设置为 1,当 P1 到达路径上的第一个路由器 R1 时,R1 收下它并把 TTL 减 1,此时 TTL 等于 0,R1 就把 P1 丢弃,并向源主机发送一个 ICMP 时间超过差错报告报文; +- 源主机接着发送第二个数据报 P2,并把 TTL 设置为 2。P2 先到达 R1,R1 收下后把 TTL 减 1 再转发给 R2,R2 收下后也把 TTL 减 1,由于此时 TTL 等于 0,R2 就丢弃 P2,并向源主机发送一个 ICMP 时间超过差错报文。 +- 不断执行这样的步骤,直到最后一个数据报刚刚到达目的主机,主机不转发数据报,也不把 TTL 值减 1。但是因为数据报封装的是无法交付的 UDP,因此目的主机要向源主机发送 ICMP 终点不可达差错报告报文。 +- 之后源主机知道了到达目的主机所经过的路由器 IP 地址以及到达每个路由器的往返时间。 + +# 虚拟专用网 VPN + +由于 IP 地址的紧缺,一个机构能申请到的 IP 地址数往往远小于本机构所拥有的主机数。并且一个机构并不需要把所有的主机接入到外部的互联网中,机构内的计算机可以使用仅在本机构有效的 IP 地址(专用地址)。 + +有三个专用地址块: + +- 10.0.0.0 \~ 10.255.255.255 +- 172.16.0.0 \~ 172.31.255.255 +- 192.168.0.0 \~ 192.168.255.255 + +VPN 使用公用的互联网作为本机构各专用网之间的通信载体。专用指机构内的主机只与本机构内的其它主机通信;虚拟指好像是,而实际上并不是,它有经过公用的互联网。 + +下图中,场所 A 和 B 的通信经过互联网,如果场所 A 的主机 X 要和另一个场所 B 的主机 Y 通信,IP 数据报的源地址是 10.1.0.1,目的地址是 10.2.0.3。数据报先发送到与互联网相连的路由器 R1,R1 对内部数据进行加密,然后重新加上数据报的首部,源地址是路由器 R1 的全球地址 125.1.2.3,目的地址是路由器 R2 的全球地址 194.4.5.6。路由器 R2 收到数据报后将数据部分进行解密,恢复原来的数据报,此时目的地址为 10.2.0.3,就交付给 Y。 + +

+ +# 网络地址转换 NAT + +专用网内部的主机使用本地 IP 地址又想和互联网上的主机通信时,可以使用 NAT 来将本地 IP 转换为全球 IP。 + +在以前,NAT 将本地 IP 和全球 IP 一一对应,这种方式下拥有 n 个全球 IP 地址的专用网内最多只可以同时有 n 台主机接入互联网。为了更有效地利用全球 IP 地址,现在常用的 NAT 转换表把传输层的端口号也用上了,使得多个专用网内部的主机共用一个全球 IP 地址。使用端口号的 NAT 也叫做网络地址与端口转换 NAPT。 + +

+ +# 路由器的结构 + +路由器从功能上可以划分为:路由选择和分组转发。 + +分组转发结构由三个部分组成:交换结构、一组输入端口和一组输出端口。 + +

+ +# 路由器分组转发流程 + +- 从数据报的首部提取目的主机的 IP 地址 D,得到目的网络地址 N。 +- 若 N 就是与此路由器直接相连的某个网络地址,则进行直接交付; +- 若路由表中有目的地址为 D 的特定主机路由,则把数据报传送给表中所指明的下一跳路由器; +- 若路由表中有到达网络 N 的路由,则把数据报传送给路由表中所指明的下一跳路由器; +- 若路由表中有一个默认路由,则把数据报传送给路由表中所指明的默认路由器; +- 报告转发分组出错。 + +

+ +# 路由选择协议 + +路由选择协议都是自适应的,能随着网络通信量和拓扑结构的变化而自适应地进行调整。 + +互联网可以划分为许多较小的自治系统 AS,一个 AS 可以使用一种和别的 AS 不同的路由选择协议。 + +可以把路由选择协议划分为两大类: + +- 自治系统内部的路由选择:RIP 和 OSPF +- 自治系统间的路由选择:BGP + +## 1. 内部网关协议 RIP + +RIP 是一种基于距离向量的路由选择协议。距离是指跳数,直接相连的路由器跳数为 1。跳数最多为 15,超过 15 表示不可达。 + +RIP 按固定的时间间隔仅和相邻路由器交换自己的路由表,经过若干次交换之后,所有路由器最终会知道到达本自治系统中任何一个网络的最短距离和下一跳路由器地址。 + +距离向量算法: + +- 对地址为 X 的相邻路由器发来的 RIP 报文,先修改报文中的所有项目,把下一跳字段中的地址改为 X,并把所有的距离字段加 1; +- 对修改后的 RIP 报文中的每一个项目,进行以下步骤: + - 若原来的路由表中没有目的网络 N,则把该项目添加到路由表中; + - 否则:若下一跳路由器地址是 X,则把收到的项目替换原来路由表中的项目;否则:若收到的项目中的距离 d 小于路由表中的距离,则进行更新(例如原始路由表项为 Net2, 5, P,新表项为 Net2, 4, X,则更新);否则什么也不做。 +- 若 3 分钟还没有收到相邻路由器的更新路由表,则把该相邻路由器标为不可达,即把距离置为 16。 + +RIP 协议实现简单,开销小。但是 RIP 能使用的最大距离为 15,限制了网络的规模。并且当网络出现故障时,要经过比较长的时间才能将此消息传送到所有路由器。 + +## 2. 内部网关协议 OSPF + +开放最短路径优先 OSPF,是为了克服 RIP 的缺点而开发出来的。 + +开放表示 OSPF 不受某一家厂商控制,而是公开发表的;最短路径优先表示使用了 Dijkstra 提出的最短路径算法 SPF。 + +OSPF 具有以下特点: + +- 向本自治系统中的所有路由器发送信息,这种方法是洪泛法。 +- 发送的信息就是与相邻路由器的链路状态,链路状态包括与哪些路由器相连以及链路的度量,度量用费用、距离、时延、带宽等来表示。 +- 只有当链路状态发生变化时,路由器才会发送信息。 + +所有路由器都具有全网的拓扑结构图,并且是一致的。相比于 RIP,OSPF 的更新过程收敛的很快。 + +## 3. 外部网关协议 BGP + +BGP(Border Gateway Protocol,边界网关协议) + +AS 之间的路由选择很困难,主要是由于: + +- 互联网规模很大; +- 各个 AS 内部使用不同的路由选择协议,无法准确定义路径的度量; +- AS 之间的路由选择必须考虑有关的策略,比如有些 AS 不愿意让其它 AS 经过。 + +BGP 只能寻找一条比较好的路由,而不是最佳路由。 + +每个 AS 都必须配置 BGP 发言人,通过在两个相邻 BGP 发言人之间建立 TCP 连接来交换路由信息。 + + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" new file mode 100644 index 00000000..e7831ceb --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234/\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234 - \351\223\276\350\267\257\345\261\202.md" @@ -0,0 +1,202 @@ + +* [基本问题](#基本问题) + * [1. 封装成帧](#1-封装成帧) + * [2. 透明传输](#2-透明传输) + * [3. 差错检测](#3-差错检测) +* [信道分类](#信道分类) + * [1. 广播信道](#1-广播信道) + * [2. 点对点信道](#2-点对点信道) +* [信道复用技术](#信道复用技术) + * [1. 频分复用](#1-频分复用) + * [2. 时分复用](#2-时分复用) + * [3. 统计时分复用](#3-统计时分复用) + * [4. 波分复用](#4-波分复用) + * [5. 码分复用](#5-码分复用) +* [CSMA/CD 协议](#csmacd-协议) +* [PPP 协议](#ppp-协议) +* [MAC 地址](#mac-地址) +* [局域网](#局域网) +* [以太网](#以太网) +* [交换机](#交换机) +* [虚拟局域网](#虚拟局域网) + + + +# 基本问题 + +## 1. 封装成帧 + +将网络层传下来的分组添加首部和尾部,用于标记帧的开始和结束。 + +

+ +## 2. 透明传输 + +透明表示一个实际存在的事物看起来好像不存在一样。 + +帧使用首部和尾部进行定界,如果帧的数据部分含有和首部尾部相同的内容,那么帧的开始和结束位置就会被错误的判定。需要在数据部分出现首部尾部相同的内容前面插入转义字符。如果数据部分出现转义字符,那么就在转义字符前面再加个转义字符。在接收端进行处理之后可以还原出原始数据。这个过程透明传输的内容是转义字符,用户察觉不到转义字符的存在。 + +

+ +## 3. 差错检测 + +目前数据链路层广泛使用了循环冗余检验(CRC)来检查比特差错。 + +# 信道分类 + +## 1. 广播信道 + +一对多通信,一个节点发送的数据能够被广播信道上所有的节点接收到。 + +所有的节点都在同一个广播信道上发送数据,因此需要有专门的控制方法进行协调,避免发生冲突(冲突也叫碰撞)。 + +主要有两种控制方法进行协调,一个是使用信道复用技术,一是使用 CSMA/CD 协议。 + +## 2. 点对点信道 + +一对一通信。 + +因为不会发生碰撞,因此也比较简单,使用 PPP 协议进行控制。 + +# 信道复用技术 + +## 1. 频分复用 + +频分复用的所有主机在相同的时间占用不同的频率带宽资源。 + +

+ +## 2. 时分复用 + +时分复用的所有主机在不同的时间占用相同的频率带宽资源。 + +

+ +使用频分复用和时分复用进行通信,在通信的过程中主机会一直占用一部分信道资源。但是由于计算机数据的突发性质,通信过程没必要一直占用信道资源而不让出给其它用户使用,因此这两种方式对信道的利用率都不高。 + +## 3. 统计时分复用 + +是对时分复用的一种改进,不固定每个用户在时分复用帧中的位置,只要有数据就集中起来组成统计时分复用帧然后发送。 + +

+ +## 4. 波分复用 + +光的频分复用。由于光的频率很高,因此习惯上用波长而不是频率来表示所使用的光载波。 + +## 5. 码分复用 + +为每个用户分配 m bit 的码片,并且所有的码片正交,对于任意两个码片 有 + + + +

+ +为了讨论方便,取 m=8,设码片 为 00011011。在拥有该码片的用户发送比特 1 时就发送该码片,发送比特 0 时就发送该码片的反码 11100100。 + +在计算时将 00011011 记作 (-1 -1 -1 +1 +1 -1 +1 +1),可以得到 + + + + + +

+ +

+ +其中 的反码。 + +利用上面的式子我们知道,当接收端使用码片 对接收到的数据进行内积运算时,结果为 0 的是其它用户发送的数据,结果为 1 的是用户发送的比特 1,结果为 -1 的是用户发送的比特 0。 + +码分复用需要发送的数据量为原先的 m 倍。 + +

+ + +# CSMA/CD 协议 + +CSMA/CD 表示载波监听多点接入 / 碰撞检测。 + +- **多点接入** :说明这是总线型网络,许多主机以多点的方式连接到总线上。 +- **载波监听** :每个主机都必须不停地监听信道。在发送前,如果监听到信道正在使用,就必须等待。 +- **碰撞检测** :在发送中,如果监听到信道已有其它主机正在发送数据,就表示发生了碰撞。虽然每个主机在发送数据之前都已经监听到信道为空闲,但是由于电磁波的传播时延的存在,还是有可能会发生碰撞。 + +记端到端的传播时延为 τ,最先发送的站点最多经过 2τ 就可以知道是否发生了碰撞,称 2τ 为 **争用期** 。只有经过争用期之后还没有检测到碰撞,才能肯定这次发送不会发生碰撞。 + +当发生碰撞时,站点要停止发送,等待一段时间再发送。这个时间采用 **截断二进制指数退避算法** 来确定。从离散的整数集合 {0, 1, .., (2k-1)} 中随机取出一个数,记作 r,然后取 r 倍的争用期作为重传等待时间。 + +

+ +# PPP 协议 + +互联网用户通常需要连接到某个 ISP 之后才能接入到互联网,PPP 协议是用户计算机和 ISP 进行通信时所使用的数据链路层协议。 + +

+ +PPP 的帧格式: + +- F 字段为帧的定界符 +- A 和 C 字段暂时没有意义 +- FCS 字段是使用 CRC 的检验序列 +- 信息部分的长度不超过 1500 + +

+ +# MAC 地址 + +MAC 地址是链路层地址,长度为 6 字节(48 位),用于唯一标识网络适配器(网卡)。 + +一台主机拥有多少个网络适配器就有多少个 MAC 地址。例如笔记本电脑普遍存在无线网络适配器和有线网络适配器,因此就有两个 MAC 地址。 + +# 局域网 + +局域网是一种典型的广播信道,主要特点是网络为一个单位所拥有,且地理范围和站点数目均有限。 + +主要有以太网、令牌环网、FDDI 和 ATM 等局域网技术,目前以太网占领着有线局域网市场。 + +可以按照网络拓扑结构对局域网进行分类: + +

+ +# 以太网 + +以太网是一种星型拓扑结构局域网。 + +早期使用集线器进行连接,集线器是一种物理层设备, 作用于比特而不是帧,当一个比特到达接口时,集线器重新生成这个比特,并将其能量强度放大,从而扩大网络的传输距离,之后再将这个比特发送到其它所有接口。如果集线器同时收到两个不同接口的帧,那么就发生了碰撞。 + +目前以太网使用交换机替代了集线器,交换机是一种链路层设备,它不会发生碰撞,能根据 MAC 地址进行存储转发。 + +以太网帧格式: + +- **类型** :标记上层使用的协议; +- **数据** :长度在 46-1500 之间,如果太小则需要填充; +- **FCS** :帧检验序列,使用的是 CRC 检验方法; + +

+ +# 交换机 + +交换机具有自学习能力,学习的是交换表的内容,交换表中存储着 MAC 地址到接口的映射。 + +正是由于这种自学习能力,因此交换机是一种即插即用设备,不需要网络管理员手动配置交换表内容。 + +下图中,交换机有 4 个接口,主机 A 向主机 B 发送数据帧时,交换机把主机 A 到接口 1 的映射写入交换表中。为了发送数据帧到 B,先查交换表,此时没有主机 B 的表项,那么主机 A 就发送广播帧,主机 C 和主机 D 会丢弃该帧,主机 B 回应该帧向主机 A 发送数据包时,交换机查找交换表得到主机 A 映射的接口为 1,就发送数据帧到接口 1,同时交换机添加主机 B 到接口 2 的映射。 + +

+ +# 虚拟局域网 + +虚拟局域网可以建立与物理位置无关的逻辑组,只有在同一个虚拟局域网中的成员才会收到链路层广播信息。 + +例如下图中 (A1, A2, A3, A4) 属于一个虚拟局域网,A1 发送的广播会被 A2、A3、A4 收到,而其它站点收不到。 + +使用 VLAN 干线连接来建立虚拟局域网,每台交换机上的一个特殊接口被设置为干线接口,以互连 VLAN 交换机。IEEE 定义了一种扩展的以太网帧格式 802.1Q,它在标准以太网帧上加进了 4 字节首部 VLAN 标签,用于表示该帧属于哪一个虚拟局域网。 + + + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" new file mode 100644 index 00000000..bd2d5190 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\270\255\344\273\213\350\200\205\346\250\241\345\274\217.md" @@ -0,0 +1,185 @@ +## 中介者(Mediator) + +### 介绍 + +中介者模式(Mediator Pattern)是用来降低多个对象和类之间的通信复杂性。这种模式提供了一个中介类,该类通常处理不同类之间的通信,并支持松耦合,使代码易于维护。中介者模式属于行为型模式。 + +### Intent + +集中相关对象之间复杂的沟通和控制方式。 + +### Class Diagram + +- Mediator:中介者,定义一个接口用于与各同事(Colleague)对象通信。 +- Colleague:同事,相关对象 + +

+ +### Implementation + +Alarm(闹钟)、CoffeePot(咖啡壶)、Calendar(日历)、Sprinkler(喷头)是一组相关的对象,在某个对象的事件产生时需要去操作其它对象,形成了下面这种依赖结构: + +

+ +使用中介者模式可以将复杂的依赖结构变成星形结构: + +

+ +```java +public abstract class Colleague { + public abstract void onEvent(Mediator mediator); +} +``` + +```java +public class Alarm extends Colleague { + + @Override + public void onEvent(Mediator mediator) { + mediator.doEvent("alarm"); + } + + public void doAlarm() { + System.out.println("doAlarm()"); + } +} +``` + +```java +public class CoffeePot extends Colleague { + @Override + public void onEvent(Mediator mediator) { + mediator.doEvent("coffeePot"); + } + + public void doCoffeePot() { + System.out.println("doCoffeePot()"); + } +} +``` + +```java +public class Calender extends Colleague { + @Override + public void onEvent(Mediator mediator) { + mediator.doEvent("calender"); + } + + public void doCalender() { + System.out.println("doCalender()"); + } +} +``` + +```java +public class Sprinkler extends Colleague { + @Override + public void onEvent(Mediator mediator) { + mediator.doEvent("sprinkler"); + } + + public void doSprinkler() { + System.out.println("doSprinkler()"); + } +} +``` + +```java +public abstract class Mediator { + public abstract void doEvent(String eventType); +} +``` + +```java +public class ConcreteMediator extends Mediator { + private Alarm alarm; + private CoffeePot coffeePot; + private Calender calender; + private Sprinkler sprinkler; + + public ConcreteMediator(Alarm alarm, CoffeePot coffeePot, Calender calender, Sprinkler sprinkler) { + this.alarm = alarm; + this.coffeePot = coffeePot; + this.calender = calender; + this.sprinkler = sprinkler; + } + + @Override + public void doEvent(String eventType) { + switch (eventType) { + case "alarm": + doAlarmEvent(); + break; + case "coffeePot": + doCoffeePotEvent(); + break; + case "calender": + doCalenderEvent(); + break; + default: + doSprinklerEvent(); + } + } + + public void doAlarmEvent() { + alarm.doAlarm(); + coffeePot.doCoffeePot(); + calender.doCalender(); + sprinkler.doSprinkler(); + } + + public void doCoffeePotEvent() { + // ... + } + + public void doCalenderEvent() { + // ... + } + + public void doSprinklerEvent() { + // ... + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Alarm alarm = new Alarm(); + CoffeePot coffeePot = new CoffeePot(); + Calender calender = new Calender(); + Sprinkler sprinkler = new Sprinkler(); + Mediator mediator = new ConcreteMediator(alarm, coffeePot, calender, sprinkler); + // 闹钟事件到达,调用中介者就可以操作相关对象 + alarm.onEvent(mediator); + } +} +``` + +```java +doAlarm() +doCoffeePot() +doCalender() +doSprinkler() +``` + +### JDK + +- All scheduleXXX() methods of [java.util.Timer](http://docs.oracle.com/javase/8/docs/api/java/util/Timer.html) +- [java.util.concurrent.Executor#execute()](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html#execute-java.lang.Runnable-) +- submit() and invokeXXX() methods of [java.util.concurrent.ExecutorService](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html) +- scheduleXXX() methods of [java.util.concurrent.ScheduledExecutorService](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html) +- [java.lang.reflect.Method#invoke()](http://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#invoke-java.lang.Object-java.lang.Object...-) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\272\253\345\205\203\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\272\253\345\205\203\346\250\241\345\274\217.md" new file mode 100644 index 00000000..23be74e7 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\272\253\345\205\203\346\250\241\345\274\217.md" @@ -0,0 +1,102 @@ +## 享元(Flyweight) + +### 介绍 + +享元模式(Flyweight Pattern)主要用于减少创建对象的数量,以减少内存占用和提高性能。这种类型的设计模式属于结构型模式,它提供了减少对象数量从而改善应用所需的对象结构的方式。 + +享元模式尝试重用现有的同类对象,如果未找到匹配的对象,则创建新对象。我们将通过创建 5 个对象来画出 20 个分布于不同位置的圆来演示这种模式。由于只有 5 种可用的颜色,所以 color 属性被用来检查现有的 Circle 对象。 + +### Intent + +利用共享的方式来支持大量细粒度的对象,这些对象一部分内部状态是相同的。 + +### Class Diagram + +- Flyweight:享元对象 +- IntrinsicState:内部状态,享元对象共享内部状态 +- ExtrinsicState:外部状态,每个享元对象的外部状态不同 + +

+ +### Implementation + +```java +public interface Flyweight { + void doOperation(String extrinsicState); +} +``` + +```java +public class ConcreteFlyweight implements Flyweight { + + private String intrinsicState; + + public ConcreteFlyweight(String intrinsicState) { + this.intrinsicState = intrinsicState; + } + + @Override + public void doOperation(String extrinsicState) { + System.out.println("Object address: " + System.identityHashCode(this)); + System.out.println("IntrinsicState: " + intrinsicState); + System.out.println("ExtrinsicState: " + extrinsicState); + } +} +``` + +```java +public class FlyweightFactory { + + private HashMap flyweights = new HashMap<>(); + + Flyweight getFlyweight(String intrinsicState) { + if (!flyweights.containsKey(intrinsicState)) { + Flyweight flyweight = new ConcreteFlyweight(intrinsicState); + flyweights.put(intrinsicState, flyweight); + } + return flyweights.get(intrinsicState); + } +} +``` + +```java +public class Client { + + public static void main(String[] args) { + FlyweightFactory factory = new FlyweightFactory(); + Flyweight flyweight1 = factory.getFlyweight("aa"); + Flyweight flyweight2 = factory.getFlyweight("aa"); + flyweight1.doOperation("x"); + flyweight2.doOperation("y"); + } +} +``` + +```html +Object address: 1163157884 +IntrinsicState: aa +ExtrinsicState: x +Object address: 1163157884 +IntrinsicState: aa +ExtrinsicState: y +``` + +### JDK + +Java 利用缓存来加速大量小对象的访问时间。 + +- java.lang.Integer#valueOf(int) +- java.lang.Boolean#valueOf(boolean) +- java.lang.Byte#valueOf(byte) +- java.lang.Character#valueOf(char) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\273\243\347\220\206\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\273\243\347\220\206\346\250\241\345\274\217.md" new file mode 100644 index 00000000..b019ef69 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\344\273\243\347\220\206\346\250\241\345\274\217.md" @@ -0,0 +1,121 @@ +## 代理(Proxy) + +### 介绍 + +在代理模式(Proxy Pattern)中,一个类代表另一个类的功能。这种类型的设计模式属于结构型模式。 + +在代理模式中,我们创建具有现有对象的对象,以便向外界提供功能接口。 + +### Intent + +控制对其它对象的访问。 + +### Class Diagram + +代理有以下四类: + +- 远程代理(Remote Proxy):控制对远程对象(不同地址空间)的访问,它负责将请求及其参数进行编码,并向不同地址空间中的对象发送已经编码的请求。 +- 虚拟代理(Virtual Proxy):根据需要创建开销很大的对象,它可以缓存实体的附加信息,以便延迟对它的访问,例如在网站加载一个很大图片时,不能马上完成,可以用虚拟代理缓存图片的大小信息,然后生成一张临时图片代替原始图片。 +- 保护代理(Protection Proxy):按权限控制对象的访问,它负责检查调用者是否具有实现一个请求所必须的访问权限。 +- 智能代理(Smart Reference):取代了简单的指针,它在访问对象时执行一些附加操作:记录对象的引用次数;当第一次引用一个对象时,将它装入内存;在访问一个实际对象前,检查是否已经锁定了它,以确保其它对象不能改变它。 + +

+ +### Implementation + +以下是一个虚拟代理的实现,模拟了图片延迟加载的情况下使用与图片大小相等的临时内容去替换原始图片,直到图片加载完成才将图片显示出来。 + +```java +public interface Image { + void showImage(); +} +``` + +```java +public class HighResolutionImage implements Image { + + private URL imageURL; + private long startTime; + private int height; + private int width; + + public int getHeight() { + return height; + } + + public int getWidth() { + return width; + } + + public HighResolutionImage(URL imageURL) { + this.imageURL = imageURL; + this.startTime = System.currentTimeMillis(); + this.width = 600; + this.height = 600; + } + + public boolean isLoad() { + // 模拟图片加载,延迟 3s 加载完成 + long endTime = System.currentTimeMillis(); + return endTime - startTime > 3000; + } + + @Override + public void showImage() { + System.out.println("Real Image: " + imageURL); + } +} +``` + +```java +public class ImageProxy implements Image { + + private HighResolutionImage highResolutionImage; + + public ImageProxy(HighResolutionImage highResolutionImage) { + this.highResolutionImage = highResolutionImage; + } + + @Override + public void showImage() { + while (!highResolutionImage.isLoad()) { + try { + System.out.println("Temp Image: " + highResolutionImage.getWidth() + " " + highResolutionImage.getHeight()); + Thread.sleep(100); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + highResolutionImage.showImage(); + } +} +``` + +```java +public class ImageViewer { + + public static void main(String[] args) throws Exception { + String image = "http://image.jpg/"; + URL url = new URL(image); + HighResolutionImage highResolutionImage = new HighResolutionImage(url); + ImageProxy imageProxy = new ImageProxy(highResolutionImage); + imageProxy.showImage(); + } +} +``` + +### JDK + +- java.lang.reflect.Proxy +- RMI + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\215\225\344\276\213\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\215\225\344\276\213\346\250\241\345\274\217.md" new file mode 100644 index 00000000..bcc1bcd0 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\215\225\344\276\213\346\250\241\345\274\217.md" @@ -0,0 +1,225 @@ +## 单例(Singleton) + +### 介绍 + +单例模式(Singleton Pattern)是 Java 中最简单的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 + +这种模式涉及到一个单一的类,该类负责创建自己的对象,同时确保只有单个对象被创建。这个类提供了一种访问其唯一的对象的方式,可以直接访问,不需要实例化该类的对象。 + +注意: + +- 1、单例类只能有一个实例。 +- 2、单例类必须自己创建自己的唯一实例。 +- 3、单例类必须给所有其他对象提供这一实例。 + +### Intent + +确保一个类只有一个实例,并提供该实例的全局访问点。 + +### Class Diagram + +使用一个私有构造函数、一个私有静态变量以及一个公有静态函数来实现。 + +私有构造函数保证了不能通过构造函数来创建对象实例,只能通过公有静态函数返回唯一的私有静态变量。 + +

+ +### Implementation + +#### Ⅰ 懒汉式-线程不安全 + +以下实现中,私有静态变量 uniqueInstance 被延迟实例化,这样做的好处是,如果没有用到该类,那么就不会实例化 uniqueInstance,从而节约资源。 + +这个实现在多线程环境下是不安全的,如果多个线程能够同时进入 `if (uniqueInstance == null)` ,并且此时 uniqueInstance 为 null,那么会有多个线程执行 `uniqueInstance = new Singleton();` 语句,这将导致实例化多次 uniqueInstance。 + +```java +public class Singleton { + + private static Singleton uniqueInstance; + + private Singleton() { + } + + public static Singleton getUniqueInstance() { + if (uniqueInstance == null) { + uniqueInstance = new Singleton(); + } + return uniqueInstance; + } +} +``` + +#### Ⅱ 饿汉式-线程安全 + +线程不安全问题主要是由于 uniqueInstance 被实例化多次,采取直接实例化 uniqueInstance 的方式就不会产生线程不安全问题。 + +但是直接实例化的方式也丢失了延迟实例化带来的节约资源的好处。 + +```java +private static Singleton uniqueInstance = new Singleton(); +``` + +#### Ⅲ 懒汉式-线程安全 + +只需要对 getUniqueInstance() 方法加锁,那么在一个时间点只能有一个线程能够进入该方法,从而避免了实例化多次 uniqueInstance。 + +但是当一个线程进入该方法之后,其它试图进入该方法的线程都必须等待,即使 uniqueInstance 已经被实例化了。这会让线程阻塞时间过长,因此该方法有性能问题,不推荐使用。 + +```java +public static synchronized Singleton getUniqueInstance() { + if (uniqueInstance == null) { + uniqueInstance = new Singleton(); + } + return uniqueInstance; +} +``` + +#### Ⅳ 双重校验锁-线程安全 + +uniqueInstance 只需要被实例化一次,之后就可以直接使用了。加锁操作只需要对实例化那部分的代码进行,只有当 uniqueInstance 没有被实例化时,才需要进行加锁。 + +双重校验锁先判断 uniqueInstance 是否已经被实例化,如果没有被实例化,那么才对实例化语句进行加锁。 + +```java +public class Singleton { + + private volatile static Singleton uniqueInstance; + + private Singleton() { + } + + public static Singleton getUniqueInstance() { + if (uniqueInstance == null) { + synchronized (Singleton.class) { + if (uniqueInstance == null) { + uniqueInstance = new Singleton(); + } + } + } + return uniqueInstance; + } +} +``` + +考虑下面的实现,也就是只使用了一个 if 语句。在 uniqueInstance == null 的情况下,如果两个线程都执行了 if 语句,那么两个线程都会进入 if 语句块内。虽然在 if 语句块内有加锁操作,但是两个线程都会执行 `uniqueInstance = new Singleton();` 这条语句,只是先后的问题,那么就会进行两次实例化。因此必须使用双重校验锁,也就是需要使用两个 if 语句:第一个 if 语句用来避免 uniqueInstance 已经被实例化之后的加锁操作,而第二个 if 语句进行了加锁,所以只能有一个线程进入,就不会出现 uniqueInstance == null 时两个线程同时进行实例化操作。 + +```java +if (uniqueInstance == null) { + synchronized (Singleton.class) { + uniqueInstance = new Singleton(); + } +} +``` + +uniqueInstance 采用 volatile 关键字修饰也是很有必要的, `uniqueInstance = new Singleton();` 这段代码其实是分为三步执行: + +1. 为 uniqueInstance 分配内存空间 +2. 初始化 uniqueInstance +3. 将 uniqueInstance 指向分配的内存地址 + +但是由于 JVM 具有指令重排的特性,执行顺序有可能变成 1>3>2。指令重排在单线程环境下不会出现问题,但是在多线程环境下会导致一个线程获得还没有初始化的实例。例如,线程 T1 执行了 1 和 3,此时 T2 调用 getUniqueInstance() 后发现 uniqueInstance 不为空,因此返回 uniqueInstance,但此时 uniqueInstance 还未被初始化。 + +使用 volatile 可以禁止 JVM 的指令重排,保证在多线程环境下也能正常运行。 + +#### Ⅴ 静态内部类实现 + +当 Singleton 类被加载时,静态内部类 SingletonHolder 没有被加载进内存。只有当调用 `getUniqueInstance()` 方法从而触发 `SingletonHolder.INSTANCE` 时 SingletonHolder 才会被加载,此时初始化 INSTANCE 实例,并且 JVM 能确保 INSTANCE 只被实例化一次。 + +这种方式不仅具有延迟初始化的好处,而且由 JVM 提供了对线程安全的支持。 + +```java +public class Singleton { + + private Singleton() { + } + + private static class SingletonHolder { + private static final Singleton INSTANCE = new Singleton(); + } + + public static Singleton getUniqueInstance() { + return SingletonHolder.INSTANCE; + } +} +``` + +#### Ⅵ 枚举实现 + +```java +public enum Singleton { + + INSTANCE; + + private String objName; + + + public String getObjName() { + return objName; + } + + + public void setObjName(String objName) { + this.objName = objName; + } + + + public static void main(String[] args) { + + // 单例测试 + Singleton firstSingleton = Singleton.INSTANCE; + firstSingleton.setObjName("firstName"); + System.out.println(firstSingleton.getObjName()); + Singleton secondSingleton = Singleton.INSTANCE; + secondSingleton.setObjName("secondName"); + System.out.println(firstSingleton.getObjName()); + System.out.println(secondSingleton.getObjName()); + + // 反射获取实例测试 + try { + Singleton[] enumConstants = Singleton.class.getEnumConstants(); + for (Singleton enumConstant : enumConstants) { + System.out.println(enumConstant.getObjName()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } +} +``` + +```html +firstName +secondName +secondName +secondName +``` + +该实现可以防止反射攻击。在其它实现中,通过 setAccessible() 方法可以将私有构造函数的访问级别设置为 public,然后调用构造函数从而实例化对象,如果要防止这种攻击,需要在构造函数中添加防止多次实例化的代码。该实现是由 JVM 保证只会实例化一次,因此不会出现上述的反射攻击。 + +该实现在多次序列化和序列化之后,不会得到多个实例。而其它实现需要使用 transient 修饰所有字段,并且实现序列化和反序列化的方法。 + +### Examples + +- Logger Classes +- Configuration Classes +- Accesing resources in shared mode +- Factories implemented as Singletons + +### JDK + +- [java.lang.Runtime#getRuntime()](http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#getRuntime%28%29) +- [java.awt.Desktop#getDesktop()](http://docs.oracle.com/javase/8/docs/api/java/awt/Desktop.html#getDesktop--) + + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\216\237\345\236\213\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\216\237\345\236\213\346\250\241\345\274\217.md" new file mode 100644 index 00000000..786c09bc --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\216\237\345\236\213\346\250\241\345\274\217.md" @@ -0,0 +1,73 @@ +# 原型模式(Prototype) + +### 介绍 + +原型模式(Prototype Pattern)是用于创建重复的对象,同时又能保证性能。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 + +这种模式是实现了一个原型接口,该接口用于创建当前对象的克隆。当直接创建对象的代价比较大时,则采用这种模式。例如,一个对象需要在一个高代价的数据库操作之后被创建。我们可以缓存该对象,在下一个请求时返回它的克隆,在需要的时候更新数据库,以此来减少数据库调用。 + +### Intent + +使用原型实例指定要创建对象的类型,通过复制这个原型来创建新对象。 + +### Class Diagram + +

+ +### Implementation + +```java +public abstract class Prototype { + abstract Prototype myClone(); +} +``` + +```java +public class ConcretePrototype extends Prototype { + + private String filed; + + public ConcretePrototype(String filed) { + this.filed = filed; + } + + @Override + Prototype myClone() { + return new ConcretePrototype(filed); + } + + @Override + public String toString() { + return filed; + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Prototype prototype = new ConcretePrototype("abc"); + Prototype clone = prototype.myClone(); + System.out.println(clone.toString()); + } +} +``` + +```html +abc +``` + +### JDK + +- [java.lang.Object#clone()](http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone%28%29) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\221\275\344\273\244\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\221\275\344\273\244\346\250\241\345\274\217.md" new file mode 100644 index 00000000..f23096b4 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\221\275\344\273\244\346\250\241\345\274\217.md" @@ -0,0 +1,142 @@ +## 命令(Command) + +### 介绍 + +命令模式(Command Pattern)是一种数据驱动的设计模式,它属于行为型模式。请求以命令的形式包裹在对象中,并传给调用对象。调用对象寻找可以处理该命令的合适的对象,并把该命令传给相应的对象,该对象执行命令。 + +### Intent + +将命令封装成对象中,具有以下作用: + +- 使用命令来参数化其它对象 +- 将命令放入队列中进行排队 +- 将命令的操作记录到日志中 +- 支持可撤销的操作 + +### Class Diagram + +- Command:命令 +- Receiver:命令接收者,也就是命令真正的执行者 +- Invoker:通过它来调用命令 +- Client:可以设置命令与命令的接收者 + +

+ +### Implementation + +设计一个遥控器,可以控制电灯开关。 + +

+ +```java +public interface Command { + void execute(); +} +``` + +```java +public class LightOnCommand implements Command { + Light light; + + public LightOnCommand(Light light) { + this.light = light; + } + + @Override + public void execute() { + light.on(); + } +} +``` + +```java +public class LightOffCommand implements Command { + Light light; + + public LightOffCommand(Light light) { + this.light = light; + } + + @Override + public void execute() { + light.off(); + } +} +``` + +```java +public class Light { + + public void on() { + System.out.println("Light is on!"); + } + + public void off() { + System.out.println("Light is off!"); + } +} +``` + +```java +/** + * 遥控器 + */ +public class Invoker { + private Command[] onCommands; + private Command[] offCommands; + private final int slotNum = 7; + + public Invoker() { + this.onCommands = new Command[slotNum]; + this.offCommands = new Command[slotNum]; + } + + public void setOnCommand(Command command, int slot) { + onCommands[slot] = command; + } + + public void setOffCommand(Command command, int slot) { + offCommands[slot] = command; + } + + public void onButtonWasPushed(int slot) { + onCommands[slot].execute(); + } + + public void offButtonWasPushed(int slot) { + offCommands[slot].execute(); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Invoker invoker = new Invoker(); + Light light = new Light(); + Command lightOnCommand = new LightOnCommand(light); + Command lightOffCommand = new LightOffCommand(light); + invoker.setOnCommand(lightOnCommand, 0); + invoker.setOffCommand(lightOffCommand, 0); + invoker.onButtonWasPushed(0); + invoker.offButtonWasPushed(0); + } +} +``` + +### JDK + +- [java.lang.Runnable](http://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html) +- [Netflix Hystrix](https://github.com/Netflix/Hystrix/wiki) +- [javax.swing.Action](http://docs.oracle.com/javase/8/docs/api/javax/swing/Action.html) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" new file mode 100644 index 00000000..956b62a0 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\207\345\277\230\345\275\225\346\250\241\345\274\217.md" @@ -0,0 +1,191 @@ +## 备忘录(Memento) + +### 介绍 + +备忘录模式(Memento Pattern)保存一个对象的某个状态,以便在适当的时候恢复对象。备忘录模式属于行为型模式。 + +### Intent + +在不违反封装的情况下获得对象的内部状态,从而在需要时可以将对象恢复到最初状态。 + +### Class Diagram + +- Originator:原始对象 +- Caretaker:负责保存好备忘录 +- Memento:备忘录,存储原始对象的的状态。备忘录实际上有两个接口,一个是提供给 Caretaker 的窄接口:它只能将备忘录传递给其它对象;一个是提供给 Originator 的宽接口,允许它访问到先前状态所需的所有数据。理想情况是只允许 Originator 访问本备忘录的内部状态。 + +

+ +### Implementation + +以下实现了一个简单计算器程序,可以输入两个值,然后计算这两个值的和。备忘录模式允许将这两个值存储起来,然后在某个时刻用存储的状态进行恢复。 + +实现参考:[Memento Pattern - Calculator Example - Java Sourcecode](https://www.oodesign.com/memento-pattern-calculator-example-java-sourcecode.html) + +```java +/** + * Originator Interface + */ +public interface Calculator { + + // Create Memento + PreviousCalculationToCareTaker backupLastCalculation(); + + // setMemento + void restorePreviousCalculation(PreviousCalculationToCareTaker memento); + + int getCalculationResult(); + + void setFirstNumber(int firstNumber); + + void setSecondNumber(int secondNumber); +} +``` + +```java +/** + * Originator Implementation + */ +public class CalculatorImp implements Calculator { + + private int firstNumber; + private int secondNumber; + + @Override + public PreviousCalculationToCareTaker backupLastCalculation() { + // create a memento object used for restoring two numbers + return new PreviousCalculationImp(firstNumber, secondNumber); + } + + @Override + public void restorePreviousCalculation(PreviousCalculationToCareTaker memento) { + this.firstNumber = ((PreviousCalculationToOriginator) memento).getFirstNumber(); + this.secondNumber = ((PreviousCalculationToOriginator) memento).getSecondNumber(); + } + + @Override + public int getCalculationResult() { + // result is adding two numbers + return firstNumber + secondNumber; + } + + @Override + public void setFirstNumber(int firstNumber) { + this.firstNumber = firstNumber; + } + + @Override + public void setSecondNumber(int secondNumber) { + this.secondNumber = secondNumber; + } +} +``` + +```java +/** + * Memento Interface to Originator + * + * This interface allows the originator to restore its state + */ +public interface PreviousCalculationToOriginator { + int getFirstNumber(); + int getSecondNumber(); +} +``` + +```java +/** + * Memento interface to CalculatorOperator (Caretaker) + */ +public interface PreviousCalculationToCareTaker { + // no operations permitted for the caretaker +} +``` + +```java +/** + * Memento Object Implementation + *

+ * Note that this object implements both interfaces to Originator and CareTaker + */ +public class PreviousCalculationImp implements PreviousCalculationToCareTaker, + PreviousCalculationToOriginator { + + private int firstNumber; + private int secondNumber; + + public PreviousCalculationImp(int firstNumber, int secondNumber) { + this.firstNumber = firstNumber; + this.secondNumber = secondNumber; + } + + @Override + public int getFirstNumber() { + return firstNumber; + } + + @Override + public int getSecondNumber() { + return secondNumber; + } +} +``` + +```java +/** + * CareTaker object + */ +public class Client { + + public static void main(String[] args) { + // program starts + Calculator calculator = new CalculatorImp(); + + // assume user enters two numbers + calculator.setFirstNumber(10); + calculator.setSecondNumber(100); + + // find result + System.out.println(calculator.getCalculationResult()); + + // Store result of this calculation in case of error + PreviousCalculationToCareTaker memento = calculator.backupLastCalculation(); + + // user enters a number + calculator.setFirstNumber(17); + + // user enters a wrong second number and calculates result + calculator.setSecondNumber(-290); + + // calculate result + System.out.println(calculator.getCalculationResult()); + + // user hits CTRL + Z to undo last operation and see last result + calculator.restorePreviousCalculation(memento); + + // result restored + System.out.println(calculator.getCalculationResult()); + } +} +``` + +```html +110 +-273 +110 +``` + +### JDK + +- java.io.Serializable + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +

+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\226\350\247\202\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\226\350\247\202\346\250\241\345\274\217.md" new file mode 100644 index 00000000..6c16edd8 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\244\226\350\247\202\346\250\241\345\274\217.md" @@ -0,0 +1,71 @@ +## 外观(Facade) + +### 介绍 + +外观模式(Facade Pattern)隐藏系统的复杂性,并向客户端提供了一个客户端可以访问系统的接口。这种类型的设计模式属于结构型模式,它向现有的系统添加一个接口,来隐藏系统的复杂性。 + +这种模式涉及到一个单一的类,该类提供了客户端请求的简化方法和对现有系统类方法的委托调用。 + +### Intent + +提供了一个统一的接口,用来访问子系统中的一群接口,从而让子系统更容易使用。 + +### Class Diagram + +

+ +### Implementation + +观看电影需要操作很多电器,使用外观模式实现一键看电影功能。 + +```java +public class SubSystem { + public void turnOnTV() { + System.out.println("turnOnTV()"); + } + + public void setCD(String cd) { + System.out.println("setCD( " + cd + " )"); + } + + public void startWatching(){ + System.out.println("startWatching()"); + } +} +``` + +```java +public class Facade { + private SubSystem subSystem = new SubSystem(); + + public void watchMovie() { + subSystem.turnOnTV(); + subSystem.setCD("a movie"); + subSystem.startWatching(); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Facade facade = new Facade(); + facade.watchMovie(); + } +} +``` + +### 设计原则 + +最少知识原则:只和你的密友谈话。也就是说客户对象所需要交互的对象应当尽可能少。 + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\267\245\345\216\202\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\267\245\345\216\202\346\250\241\345\274\217.md" new file mode 100644 index 00000000..b2576352 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\267\245\345\216\202\346\250\241\345\274\217.md" @@ -0,0 +1,76 @@ +## 工厂方法(Factory Method) + +### 介绍 + +工厂模式(Factory Pattern)是 Java 中最常用的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 + +在工厂模式中,我们在创建对象时不会对客户端暴露创建逻辑,并且是通过使用一个共同的接口来指向新创建的对象。 + +### Intent + +定义了一个创建对象的接口,但由子类决定要实例化哪个类。工厂方法把实例化操作推迟到子类。 + +### Class Diagram + +在简单工厂中,创建对象的是另一个类,而在工厂方法中,是由子类来创建对象。 + +下图中,Factory 有一个 doSomething() 方法,这个方法需要用到一个产品对象,这个产品对象由 factoryMethod() 方法创建。该方法是抽象的,需要由子类去实现。 + +

+ +### Implementation + +```java +public abstract class Factory { + abstract public Product factoryMethod(); + public void doSomething() { + Product product = factoryMethod(); + // do something with the product + } +} +``` + +```java +public class ConcreteFactory extends Factory { + public Product factoryMethod() { + return new ConcreteProduct(); + } +} +``` + +```java +public class ConcreteFactory1 extends Factory { + public Product factoryMethod() { + return new ConcreteProduct1(); + } +} +``` + +```java +public class ConcreteFactory2 extends Factory { + public Product factoryMethod() { + return new ConcreteProduct2(); + } +} +``` + +### JDK + +- [java.util.Calendar](http://docs.oracle.com/javase/8/docs/api/java/util/Calendar.html#getInstance--) +- [java.util.ResourceBundle](http://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html#getBundle-java.lang.String-) +- [java.text.NumberFormat](http://docs.oracle.com/javase/8/docs/api/java/text/NumberFormat.html#getInstance--) +- [java.nio.charset.Charset](http://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html#forName-java.lang.String-) +- [java.net.URLStreamHandlerFactory](http://docs.oracle.com/javase/8/docs/api/java/net/URLStreamHandlerFactory.html#createURLStreamHandler-java.lang.String-) +- [java.util.EnumSet](https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html#of-E-) +- [javax.xml.bind.JAXBContext](https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBContext.html#createMarshaller--) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" new file mode 100644 index 00000000..6c500b4d --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\345\273\272\351\200\240\350\200\205\346\250\241\345\274\217.md" @@ -0,0 +1,106 @@ +## 生成器(Builder) + +### 介绍 + +建造者模式(Builder Pattern)使用多个简单的对象一步一步构建成一个复杂的对象。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 + +一个 Builder 类会一步一步构造最终的对象。该 Builder 类是独立于其他对象的。 + +### Intent + +封装一个对象的构造过程,并允许按步骤构造。 + +### Class Diagram + +

+ +### Implementation + +以下是一个简易的 StringBuilder 实现,参考了 JDK 1.8 源码。 + +```java +public class AbstractStringBuilder { + protected char[] value; + + protected int count; + + public AbstractStringBuilder(int capacity) { + count = 0; + value = new char[capacity]; + } + + public AbstractStringBuilder append(char c) { + ensureCapacityInternal(count + 1); + value[count++] = c; + return this; + } + + private void ensureCapacityInternal(int minimumCapacity) { + // overflow-conscious code + if (minimumCapacity - value.length > 0) + expandCapacity(minimumCapacity); + } + + void expandCapacity(int minimumCapacity) { + int newCapacity = value.length * 2 + 2; + if (newCapacity - minimumCapacity < 0) + newCapacity = minimumCapacity; + if (newCapacity < 0) { + if (minimumCapacity < 0) // overflow + throw new OutOfMemoryError(); + newCapacity = Integer.MAX_VALUE; + } + value = Arrays.copyOf(value, newCapacity); + } +} +``` + +```java +public class StringBuilder extends AbstractStringBuilder { + public StringBuilder() { + super(16); + } + + @Override + public String toString() { + // Create a copy, don't share the array + return new String(value, 0, count); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + StringBuilder sb = new StringBuilder(); + final int count = 26; + for (int i = 0; i < count; i++) { + sb.append((char) ('a' + i)); + } + System.out.println(sb.toString()); + } +} +``` + +```html +abcdefghijklmnopqrstuvwxyz +``` + +### JDK + +- [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html) +- [java.nio.ByteBuffer](http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html#put-byte-) +- [java.lang.StringBuffer](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html#append-boolean-) +- [java.lang.Appendable](http://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html) +- [Apache Camel builders](https://github.com/apache/camel/tree/0e195428ee04531be27a0b659005e3aa8d159d23/camel-core/src/main/java/org/apache/camel/builder) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\212\275\350\261\241\345\267\245\345\216\202.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\212\275\350\261\241\345\267\245\345\216\202.md" new file mode 100644 index 00000000..c8f41d3b --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\212\275\350\261\241\345\267\245\345\216\202.md" @@ -0,0 +1,114 @@ +## 抽象工厂(Abstract Factory) + +### 介绍 + +抽象工厂模式(Abstract Factory Pattern)是围绕一个超级工厂创建其他工厂。该超级工厂又称为其他工厂的工厂。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 + +在抽象工厂模式中,接口是负责创建一个相关对象的工厂,不需要显式指定它们的类。每个生成的工厂都能按照工厂模式提供对象。 + +### Intent + +提供一个接口,用于创建 **相关的对象家族** 。 + +### Class Diagram + +抽象工厂模式创建的是对象家族,也就是很多对象而不是一个对象,并且这些对象是相关的,也就是说必须一起创建出来。而工厂方法模式只是用于创建一个对象,这和抽象工厂模式有很大不同。 + +抽象工厂模式用到了工厂方法模式来创建单一对象,AbstractFactory 中的 createProductA() 和 createProductB() 方法都是让子类来实现,这两个方法单独来看就是在创建一个对象,这符合工厂方法模式的定义。 + +至于创建对象的家族这一概念是在 Client 体现,Client 要通过 AbstractFactory 同时调用两个方法来创建出两个对象,在这里这两个对象就有很大的相关性,Client 需要同时创建出这两个对象。 + +从高层次来看,抽象工厂使用了组合,即 Cilent 组合了 AbstractFactory,而工厂方法模式使用了继承。 + +

+ +### Implementation + +```java +public class AbstractProductA { +} +``` + +```java +public class AbstractProductB { +} +``` + +```java +public class ProductA1 extends AbstractProductA { +} +``` + +```java +public class ProductA2 extends AbstractProductA { +} +``` + +```java +public class ProductB1 extends AbstractProductB { +} +``` + +```java +public class ProductB2 extends AbstractProductB { +} +``` + +```java +public abstract class AbstractFactory { + abstract AbstractProductA createProductA(); + abstract AbstractProductB createProductB(); +} +``` + +```java +public class ConcreteFactory1 extends AbstractFactory { + AbstractProductA createProductA() { + return new ProductA1(); + } + + AbstractProductB createProductB() { + return new ProductB1(); + } +} +``` + +```java +public class ConcreteFactory2 extends AbstractFactory { + AbstractProductA createProductA() { + return new ProductA2(); + } + + AbstractProductB createProductB() { + return new ProductB2(); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + AbstractFactory abstractFactory = new ConcreteFactory1(); + AbstractProductA productA = abstractFactory.createProductA(); + AbstractProductB productB = abstractFactory.createProductB(); + // do something with productA and productB + } +} +``` + +### JDK + +- [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html) +- [javax.xml.transform.TransformerFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/transform/TransformerFactory.html#newInstance--) +- [javax.xml.xpath.XPathFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/xpath/XPathFactory.html#newInstance--) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\241\245\346\216\245\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\241\245\346\216\245\346\250\241\345\274\217.md" new file mode 100644 index 00000000..ef9b3c47 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\241\245\346\216\245\346\250\241\345\274\217.md" @@ -0,0 +1,175 @@ +## 桥接(Bridge) + +### 介绍 + +桥接(Bridge)是用于把抽象化与实现化解耦,使得二者可以独立变化。这种类型的设计模式属于结构型模式,它通过提供抽象化和实现化之间的桥接结构,来实现二者的解耦。 + +这种模式涉及到一个作为桥接的接口,使得实体类的功能独立于接口实现类。这两种类型的类可被结构化改变而互不影响。 + +我们通过下面的实例来演示桥接模式(Bridge Pattern)的用法。其中,可以使用相同的抽象类方法但是不同的桥接实现类,来画出不同颜色的圆。 + +### Intent + +将抽象与实现分离开来,使它们可以独立变化。 + +### Class Diagram + +- Abstraction:定义抽象类的接口 +- Implementor:定义实现类接口 + +

+ +### Implementation + +RemoteControl 表示遥控器,指代 Abstraction。 + +TV 表示电视,指代 Implementor。 + +桥接模式将遥控器和电视分离开来,从而可以独立改变遥控器或者电视的实现。 + +```java +public abstract class TV { + public abstract void on(); + + public abstract void off(); + + public abstract void tuneChannel(); +} +``` + +```java +public class Sony extends TV { + @Override + public void on() { + System.out.println("Sony.on()"); + } + + @Override + public void off() { + System.out.println("Sony.off()"); + } + + @Override + public void tuneChannel() { + System.out.println("Sony.tuneChannel()"); + } +} +``` + +```java +public class RCA extends TV { + @Override + public void on() { + System.out.println("RCA.on()"); + } + + @Override + public void off() { + System.out.println("RCA.off()"); + } + + @Override + public void tuneChannel() { + System.out.println("RCA.tuneChannel()"); + } +} +``` + +```java +public abstract class RemoteControl { + protected TV tv; + + public RemoteControl(TV tv) { + this.tv = tv; + } + + public abstract void on(); + + public abstract void off(); + + public abstract void tuneChannel(); +} +``` + +```java +public class ConcreteRemoteControl1 extends RemoteControl { + public ConcreteRemoteControl1(TV tv) { + super(tv); + } + + @Override + public void on() { + System.out.println("ConcreteRemoteControl1.on()"); + tv.on(); + } + + @Override + public void off() { + System.out.println("ConcreteRemoteControl1.off()"); + tv.off(); + } + + @Override + public void tuneChannel() { + System.out.println("ConcreteRemoteControl1.tuneChannel()"); + tv.tuneChannel(); + } +} +``` + +```java +public class ConcreteRemoteControl2 extends RemoteControl { + public ConcreteRemoteControl2(TV tv) { + super(tv); + } + + @Override + public void on() { + System.out.println("ConcreteRemoteControl2.on()"); + tv.on(); + } + + @Override + public void off() { + System.out.println("ConcreteRemoteControl2.off()"); + tv.off(); + } + + @Override + public void tuneChannel() { + System.out.println("ConcreteRemoteControl2.tuneChannel()"); + tv.tuneChannel(); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + RemoteControl remoteControl1 = new ConcreteRemoteControl1(new RCA()); + remoteControl1.on(); + remoteControl1.off(); + remoteControl1.tuneChannel(); + RemoteControl remoteControl2 = new ConcreteRemoteControl2(new Sony()); + remoteControl2.on(); + remoteControl2.off(); + remoteControl2.tuneChannel(); + } +} +``` + +### JDK + +- AWT (It provides an abstraction layer which maps onto the native OS the windowing support.) +- JDBC + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\250\241\346\235\277\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\250\241\346\235\277\346\250\241\345\274\217.md" new file mode 100644 index 00000000..6feaf664 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\346\250\241\346\235\277\346\250\241\345\274\217.md" @@ -0,0 +1,111 @@ +## 模板方法(Template Method) + +### 介绍 + +在模板模式(Template Pattern)中,一个抽象类公开定义了执行它的方法的方式/模板。它的子类可以按需要重写方法实现,但调用将以抽象类中定义的方式进行。这种类型的设计模式属于行为型模式。 + +### Intent + +定义算法框架,并将一些步骤的实现延迟到子类。 + +通过模板方法,子类可以重新定义算法的某些步骤,而不用改变算法的结构。 + +### Class Diagram + +

+ +### Implementation + +冲咖啡和冲茶都有类似的流程,但是某些步骤会有点不一样,要求复用那些相同步骤的代码。 + +

+ +```java +public abstract class CaffeineBeverage { + + final void prepareRecipe() { + boilWater(); + brew(); + pourInCup(); + addCondiments(); + } + + abstract void brew(); + + abstract void addCondiments(); + + void boilWater() { + System.out.println("boilWater"); + } + + void pourInCup() { + System.out.println("pourInCup"); + } +} +``` + +```java +public class Coffee extends CaffeineBeverage { + @Override + void brew() { + System.out.println("Coffee.brew"); + } + + @Override + void addCondiments() { + System.out.println("Coffee.addCondiments"); + } +} +``` + +```java +public class Tea extends CaffeineBeverage { + @Override + void brew() { + System.out.println("Tea.brew"); + } + + @Override + void addCondiments() { + System.out.println("Tea.addCondiments"); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + CaffeineBeverage caffeineBeverage = new Coffee(); + caffeineBeverage.prepareRecipe(); + System.out.println("-----------"); + caffeineBeverage = new Tea(); + caffeineBeverage.prepareRecipe(); + } +} +``` + +```html +boilWater +Coffee.brew +pourInCup +Coffee.addCondiments +----------- +boilWater +Tea.brew +pourInCup +Tea.addCondiments +``` + +### JDK + +- java.util.Collections#sort() +- java.io.InputStream#skip() +- java.io.InputStream#read() +- java.util.AbstractList#indexOf() + + + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\212\266\346\200\201\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\212\266\346\200\201\346\250\241\345\274\217.md" new file mode 100644 index 00000000..d2dbf6a0 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\212\266\346\200\201\346\250\241\345\274\217.md" @@ -0,0 +1,318 @@ +## 状态(State) + +### 介绍 + +在状态模式(State Pattern)中,类的行为是基于它的状态改变的。这种类型的设计模式属于行为型模式。 + +在状态模式中,我们创建表示各种状态的对象和一个行为随着状态对象改变而改变的 context 对象。 + +### Intent + +允许对象在内部状态改变时改变它的行为,对象看起来好像修改了它所属的类。 + +### Class Diagram + +

+ +### Implementation + +糖果销售机有多种状态,每种状态下销售机有不同的行为,状态可以发生转移,使得销售机的行为也发生改变。 + +

+ +```java +public interface State { + /** + * 投入 25 分钱 + */ + void insertQuarter(); + + /** + * 退回 25 分钱 + */ + void ejectQuarter(); + + /** + * 转动曲柄 + */ + void turnCrank(); + + /** + * 发放糖果 + */ + void dispense(); +} +``` + +```java +public class HasQuarterState implements State { + + private GumballMachine gumballMachine; + + public HasQuarterState(GumballMachine gumballMachine) { + this.gumballMachine = gumballMachine; + } + + @Override + public void insertQuarter() { + System.out.println("You can't insert another quarter"); + } + + @Override + public void ejectQuarter() { + System.out.println("Quarter returned"); + gumballMachine.setState(gumballMachine.getNoQuarterState()); + } + + @Override + public void turnCrank() { + System.out.println("You turned..."); + gumballMachine.setState(gumballMachine.getSoldState()); + } + + @Override + public void dispense() { + System.out.println("No gumball dispensed"); + } +} +``` + +```java +public class NoQuarterState implements State { + + GumballMachine gumballMachine; + + public NoQuarterState(GumballMachine gumballMachine) { + this.gumballMachine = gumballMachine; + } + + @Override + public void insertQuarter() { + System.out.println("You insert a quarter"); + gumballMachine.setState(gumballMachine.getHasQuarterState()); + } + + @Override + public void ejectQuarter() { + System.out.println("You haven't insert a quarter"); + } + + @Override + public void turnCrank() { + System.out.println("You turned, but there's no quarter"); + } + + @Override + public void dispense() { + System.out.println("You need to pay first"); + } +} +``` + +```java +public class SoldOutState implements State { + + GumballMachine gumballMachine; + + public SoldOutState(GumballMachine gumballMachine) { + this.gumballMachine = gumballMachine; + } + + @Override + public void insertQuarter() { + System.out.println("You can't insert a quarter, the machine is sold out"); + } + + @Override + public void ejectQuarter() { + System.out.println("You can't eject, you haven't inserted a quarter yet"); + } + + @Override + public void turnCrank() { + System.out.println("You turned, but there are no gumballs"); + } + + @Override + public void dispense() { + System.out.println("No gumball dispensed"); + } +} +``` + +```java +public class SoldState implements State { + + GumballMachine gumballMachine; + + public SoldState(GumballMachine gumballMachine) { + this.gumballMachine = gumballMachine; + } + + @Override + public void insertQuarter() { + System.out.println("Please wait, we're already giving you a gumball"); + } + + @Override + public void ejectQuarter() { + System.out.println("Sorry, you already turned the crank"); + } + + @Override + public void turnCrank() { + System.out.println("Turning twice doesn't get you another gumball!"); + } + + @Override + public void dispense() { + gumballMachine.releaseBall(); + if (gumballMachine.getCount() > 0) { + gumballMachine.setState(gumballMachine.getNoQuarterState()); + } else { + System.out.println("Oops, out of gumballs"); + gumballMachine.setState(gumballMachine.getSoldOutState()); + } + } +} +``` + +```java +public class GumballMachine { + + private State soldOutState; + private State noQuarterState; + private State hasQuarterState; + private State soldState; + + private State state; + private int count = 0; + + public GumballMachine(int numberGumballs) { + count = numberGumballs; + soldOutState = new SoldOutState(this); + noQuarterState = new NoQuarterState(this); + hasQuarterState = new HasQuarterState(this); + soldState = new SoldState(this); + + if (numberGumballs > 0) { + state = noQuarterState; + } else { + state = soldOutState; + } + } + + public void insertQuarter() { + state.insertQuarter(); + } + + public void ejectQuarter() { + state.ejectQuarter(); + } + + public void turnCrank() { + state.turnCrank(); + state.dispense(); + } + + public void setState(State state) { + this.state = state; + } + + public void releaseBall() { + System.out.println("A gumball comes rolling out the slot..."); + if (count != 0) { + count -= 1; + } + } + + public State getSoldOutState() { + return soldOutState; + } + + public State getNoQuarterState() { + return noQuarterState; + } + + public State getHasQuarterState() { + return hasQuarterState; + } + + public State getSoldState() { + return soldState; + } + + public int getCount() { + return count; + } +} +``` + +```java +public class Client { + + public static void main(String[] args) { + GumballMachine gumballMachine = new GumballMachine(5); + + gumballMachine.insertQuarter(); + gumballMachine.turnCrank(); + + gumballMachine.insertQuarter(); + gumballMachine.ejectQuarter(); + gumballMachine.turnCrank(); + + gumballMachine.insertQuarter(); + gumballMachine.turnCrank(); + gumballMachine.insertQuarter(); + gumballMachine.turnCrank(); + gumballMachine.ejectQuarter(); + + gumballMachine.insertQuarter(); + gumballMachine.insertQuarter(); + gumballMachine.turnCrank(); + gumballMachine.insertQuarter(); + gumballMachine.turnCrank(); + gumballMachine.insertQuarter(); + gumballMachine.turnCrank(); + } +} +``` + +```html +You insert a quarter +You turned... +A gumball comes rolling out the slot... +You insert a quarter +Quarter returned +You turned, but there's no quarter +You need to pay first +You insert a quarter +You turned... +A gumball comes rolling out the slot... +You insert a quarter +You turned... +A gumball comes rolling out the slot... +You haven't insert a quarter +You insert a quarter +You can't insert another quarter +You turned... +A gumball comes rolling out the slot... +You insert a quarter +You turned... +A gumball comes rolling out the slot... +Oops, out of gumballs +You can't insert a quarter, the machine is sold out +You turned, but there are no gumballs +No gumball dispensed +``` +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" new file mode 100644 index 00000000..60221f94 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\251\272\345\257\271\350\261\241\346\250\241\345\274\217.md" @@ -0,0 +1,72 @@ +## 空对象(Null) + +### 介绍 + +在空对象模式(Null Object Pattern)中,一个空对象取代 NULL 对象实例的检查。Null 对象不是检查空值,而是反应一个不做任何动作的关系。这样的 Null 对象也可以在数据不可用的时候提供默认的行为。 + +在空对象模式中,我们创建一个指定各种要执行的操作的抽象类和扩展该类的实体类,还创建一个未对该类做任何实现的空对象类,该空对象类将无缝地使用在需要检查空值的地方。 + +### Intent + +使用什么都不做 + +的空对象来代替 NULL。 + +一个方法返回 NULL,意味着方法的调用端需要去检查返回值是否是 NULL,这么做会导致非常多的冗余的检查代码。并且如果某一个调用端忘记了做这个检查返回值,而直接使用返回的对象,那么就有可能抛出空指针异常。 + +### Class Diagram + +

+ +### Implementation + +```java +public abstract class AbstractOperation { + abstract void request(); +} +``` + +```java +public class RealOperation extends AbstractOperation { + @Override + void request() { + System.out.println("do something"); + } +} +``` + +```java +public class NullOperation extends AbstractOperation{ + @Override + void request() { + // do nothing + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + AbstractOperation abstractOperation = func(-1); + abstractOperation.request(); + } + + public static AbstractOperation func(int para) { + if (para < 0) { + return new NullOperation(); + } + return new RealOperation(); + } +} +``` +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\255\226\347\225\245\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\255\226\347\225\245\346\250\241\345\274\217.md" new file mode 100644 index 00000000..e17416c6 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\255\226\347\225\245\346\250\241\345\274\217.md" @@ -0,0 +1,106 @@ +## 策略(Strategy) + +### 介绍 + +在策略模式(Strategy Pattern)中,一个类的行为或其算法可以在运行时更改。这种类型的设计模式属于行为型模式。 + +在策略模式中,我们创建表示各种策略的对象和一个行为随着策略对象改变而改变的 context 对象。策略对象改变 context 对象的执行算法。 + +### Intent + +定义一系列算法,封装每个算法,并使它们可以互换。 + +策略模式可以让算法独立于使用它的客户端。 + +### Class Diagram + +- Strategy 接口定义了一个算法族,它们都实现了 behavior() 方法。 +- Context 是使用到该算法族的类,其中的 doSomething() 方法会调用 behavior(),setStrategy(Strategy) 方法可以动态地改变 strategy 对象,也就是说能动态地改变 Context 所使用的算法。 + +

+ +### 与状态模式的比较 + +状态模式的类图和策略模式类似,并且都是能够动态改变对象的行为。但是状态模式是通过状态转移来改变 Context 所组合的 State 对象,而策略模式是通过 Context 本身的决策来改变组合的 Strategy 对象。所谓的状态转移,是指 Context 在运行过程中由于一些条件发生改变而使得 State 对象发生改变,注意必须要是在运行过程中。 + +状态模式主要是用来解决状态转移的问题,当状态发生转移了,那么 Context 对象就会改变它的行为;而策略模式主要是用来封装一组可以互相替代的算法族,并且可以根据需要动态地去替换 Context 使用的算法。 + +### Implementation + +设计一个鸭子,它可以动态地改变叫声。这里的算法族是鸭子的叫声行为。 + +```java +public interface QuackBehavior { + void quack(); +} +``` + +```java +public class Quack implements QuackBehavior { + @Override + public void quack() { + System.out.println("quack!"); + } +} +``` + +```java +public class Squeak implements QuackBehavior{ + @Override + public void quack() { + System.out.println("squeak!"); + } +} +``` + +```java +public class Duck { + + private QuackBehavior quackBehavior; + + public void performQuack() { + if (quackBehavior != null) { + quackBehavior.quack(); + } + } + + public void setQuackBehavior(QuackBehavior quackBehavior) { + this.quackBehavior = quackBehavior; + } +} +``` + +```java +public class Client { + + public static void main(String[] args) { + Duck duck = new Duck(); + duck.setQuackBehavior(new Squeak()); + duck.performQuack(); + duck.setQuackBehavior(new Quack()); + duck.performQuack(); + } +} +``` + +```html +squeak! +quack! +``` + +### JDK + +- java.util.Comparator#compare() +- javax.servlet.http.HttpServlet +- javax.servlet.Filter#doFilter() + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" new file mode 100644 index 00000000..6da387cf --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\256\200\345\215\225\345\267\245\345\216\202\346\250\241\345\274\217.md" @@ -0,0 +1,97 @@ +## 简单工厂(Simple Factory) + +### 介绍 + +简单工厂模式是属于创建型模式,又叫做静态工厂方法(Static Factory Method)模式,但不属于23种GOF设计模式之一。简单工厂模式是由一个工厂对象决定创建出哪一种产品类的实例。简单工厂模式是工厂模式家族中最简单实用的模式,可以理解为是不同工厂模式的一个特殊实现。 + +### Intent + +在创建一个对象时不向客户暴露内部细节,并提供一个创建对象的通用接口。 + +### Class Diagram + +简单工厂把实例化的操作单独放到一个类中,这个类就成为简单工厂类,让简单工厂类来决定应该用哪个具体子类来实例化。 + +这样做能把客户类和具体子类的实现解耦,客户类不再需要知道有哪些子类以及应当实例化哪个子类。客户类往往有多个,如果不使用简单工厂,那么所有的客户类都要知道所有子类的细节。而且一旦子类发生改变,例如增加子类,那么所有的客户类都要进行修改。 + +

+ +### Implementation + +```java +public interface Product { +} +``` + +```java +public class ConcreteProduct implements Product { +} +``` + +```java +public class ConcreteProduct1 implements Product { +} +``` + +```java +public class ConcreteProduct2 implements Product { +} +``` + +以下的 Client 类包含了实例化的代码,这是一种错误的实现。如果在客户类中存在这种实例化代码,就需要考虑将代码放到简单工厂中。 + +```java +public class Client { + + public static void main(String[] args) { + int type = 1; + Product product; + if (type == 1) { + product = new ConcreteProduct1(); + } else if (type == 2) { + product = new ConcreteProduct2(); + } else { + product = new ConcreteProduct(); + } + // do something with the product + } +} +``` + +以下的 SimpleFactory 是简单工厂实现,它被所有需要进行实例化的客户类调用。 + +```java +public class SimpleFactory { + + public Product createProduct(int type) { + if (type == 1) { + return new ConcreteProduct1(); + } else if (type == 2) { + return new ConcreteProduct2(); + } + return new ConcreteProduct(); + } +} +``` + +```java +public class Client { + + public static void main(String[] args) { + SimpleFactory simpleFactory = new SimpleFactory(); + Product product = simpleFactory.createProduct(1); + // do something with the product + } +} +``` +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\273\204\345\220\210\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\273\204\345\220\210\346\250\241\345\274\217.md" new file mode 100644 index 00000000..4897f247 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\347\273\204\345\220\210\346\250\241\345\274\217.md" @@ -0,0 +1,150 @@ +## 组合(Composite) + +### 介绍 + +组合模式(Composite Pattern),又叫部分整体模式,是用于把一组相似的对象当作一个单一的对象。组合模式依据树形结构来组合对象,用来表示部分以及整体层次。这种类型的设计模式属于结构型模式,它创建了对象组的树形结构。 + +这种模式创建了一个包含自己对象组的类。该类提供了修改相同对象组的方式。 + +### Intent + +将对象组合成树形结构来表示“整体/部分”层次关系,允许用户以相同的方式处理单独对象和组合对象。 + +### Class Diagram + +组件(Component)类是组合类(Composite)和叶子类(Leaf)的父类,可以把组合类看成是树的中间节点。 + +组合对象拥有一个或者多个组件对象,因此组合对象的操作可以委托给组件对象去处理,而组件对象可以是另一个组合对象或者叶子对象。 + +

+ +### Implementation + +```java +public abstract class Component { + protected String name; + + public Component(String name) { + this.name = name; + } + + public void print() { + print(0); + } + + abstract void print(int level); + + abstract public void add(Component component); + + abstract public void remove(Component component); +} +``` + +```java +public class Composite extends Component { + + private List child; + + public Composite(String name) { + super(name); + child = new ArrayList<>(); + } + + @Override + void print(int level) { + for (int i = 0; i < level; i++) { + System.out.print("--"); + } + System.out.println("Composite:" + name); + for (Component component : child) { + component.print(level + 1); + } + } + + @Override + public void add(Component component) { + child.add(component); + } + + @Override + public void remove(Component component) { + child.remove(component); + } +} +``` + +```java +public class Leaf extends Component { + public Leaf(String name) { + super(name); + } + + @Override + void print(int level) { + for (int i = 0; i < level; i++) { + System.out.print("--"); + } + System.out.println("left:" + name); + } + + @Override + public void add(Component component) { + throw new UnsupportedOperationException(); // 牺牲透明性换取单一职责原则,这样就不用考虑是叶子节点还是组合节点 + } + + @Override + public void remove(Component component) { + throw new UnsupportedOperationException(); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Composite root = new Composite("root"); + Component node1 = new Leaf("1"); + Component node2 = new Composite("2"); + Component node3 = new Leaf("3"); + root.add(node1); + root.add(node2); + root.add(node3); + Component node21 = new Leaf("21"); + Component node22 = new Composite("22"); + node2.add(node21); + node2.add(node22); + Component node221 = new Leaf("221"); + node22.add(node221); + root.print(); + } +} +``` + +```html +Composite:root +--left:1 +--Composite:2 +----left:21 +----Composite:22 +------left:221 +--left:3 +``` + +### JDK + +- javax.swing.JComponent#add(Component) +- java.awt.Container#add(Component) +- java.util.Map#putAll(Map) +- java.util.List#addAll(Collection) +- java.util.Set#addAll(Collection) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" new file mode 100644 index 00000000..7a1d643e --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\243\205\351\245\260\350\200\205\346\250\241\345\274\217.md" @@ -0,0 +1,126 @@ +## 装饰(Decorator) + +### 介绍 + +装饰器模式(Decorator Pattern)允许向一个现有的对象添加新的功能,同时又不改变其结构。这种类型的设计模式属于结构型模式,它是作为现有的类的一个包装。 + +这种模式创建了一个装饰类,用来包装原有的类,并在保持类方法签名完整性的前提下,提供了额外的功能。 + +我们通过下面的实例来演示装饰器模式的用法。其中,我们将把一个形状装饰上不同的颜色,同时又不改变形状类。 + +### Intent + +为对象动态添加功能。 + +### Class Diagram + +装饰者(Decorator)和具体组件(ConcreteComponent)都继承自组件(Component),具体组件的方法实现不需要依赖于其它对象,而装饰者组合了一个组件,这样它可以装饰其它装饰者或者具体组件。所谓装饰,就是把这个装饰者套在被装饰者之上,从而动态扩展被装饰者的功能。装饰者的方法有一部分是自己的,这属于它的功能,然后调用被装饰者的方法实现,从而也保留了被装饰者的功能。可以看到,具体组件应当是装饰层次的最低层,因为只有具体组件的方法实现不需要依赖于其它对象。 + +

+ +### Implementation + +设计不同种类的饮料,饮料可以添加配料,比如可以添加牛奶,并且支持动态添加新配料。每增加一种配料,该饮料的价格就会增加,要求计算一种饮料的价格。 + +下图表示在 DarkRoast 饮料上新增新添加 Mocha 配料,之后又添加了 Whip 配料。DarkRoast 被 Mocha 包裹,Mocha 又被 Whip 包裹。它们都继承自相同父类,都有 cost() 方法,外层类的 cost() 方法调用了内层类的 cost() 方法。 + +

+ +```java +public interface Beverage { + double cost(); +} +``` + +```java +public class DarkRoast implements Beverage { + @Override + public double cost() { + return 1; + } +} +``` + +```java +public class HouseBlend implements Beverage { + @Override + public double cost() { + return 1; + } +} +``` + +```java +public abstract class CondimentDecorator implements Beverage { + protected Beverage beverage; +} +``` + +```java +public class Milk extends CondimentDecorator { + + public Milk(Beverage beverage) { + this.beverage = beverage; + } + + @Override + public double cost() { + return 1 + beverage.cost(); + } +} +``` + +```java +public class Mocha extends CondimentDecorator { + + public Mocha(Beverage beverage) { + this.beverage = beverage; + } + + @Override + public double cost() { + return 1 + beverage.cost(); + } +} +``` + +```java +public class Client { + + public static void main(String[] args) { + Beverage beverage = new HouseBlend(); + beverage = new Mocha(beverage); + beverage = new Milk(beverage); + System.out.println(beverage.cost()); + } +} +``` + +```html +3.0 +``` + +### 设计原则 + +类应该对扩展开放,对修改关闭:也就是添加新功能时不需要修改代码。饮料可以动态添加新的配料,而不需要去修改饮料的代码。 + +不可能把所有的类设计成都满足这一原则,应当把该原则应用于最有可能发生改变的地方。 + +### JDK + +- java.io.BufferedInputStream(InputStream) +- java.io.DataInputStream(InputStream) +- java.io.BufferedOutputStream(OutputStream) +- java.util.zip.ZipOutputStream(OutputStream) +- java.util.Collections#checked[List|Map|Set|SortedSet|SortedMap]() + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" new file mode 100644 index 00000000..c86ff758 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\202\345\257\237\350\200\205\346\250\241\345\274\217.md" @@ -0,0 +1,149 @@ +## 观察者(Observer) + +### 介绍 + +当对象间存在一对多关系时,则使用观察者模式(Observer Pattern)。比如,当一个对象被修改时,则会自动通知依赖它的对象。观察者模式属于行为型模式。 + +### Intent + +定义对象之间的一对多依赖,当一个对象状态改变时,它的所有依赖都会收到通知并且自动更新状态。 + +主题(Subject)是被观察的对象,而其所有依赖者(Observer)称为观察者。 + +

+ +### Class Diagram + +主题(Subject)具有注册和移除观察者、并通知所有观察者的功能,主题是通过维护一张观察者列表来实现这些操作的。 + +观察者(Observer)的注册功能需要调用主题的 registerObserver() 方法。 + +

+ +### Implementation + +天气数据布告板会在天气信息发生改变时更新其内容,布告板有多个,并且在将来会继续增加。 + +

+ +```java +public interface Subject { + void registerObserver(Observer o); + + void removeObserver(Observer o); + + void notifyObserver(); +} +``` + +```java +public class WeatherData implements Subject { + private List observers; + private float temperature; + private float humidity; + private float pressure; + + public WeatherData() { + observers = new ArrayList<>(); + } + + public void setMeasurements(float temperature, float humidity, float pressure) { + this.temperature = temperature; + this.humidity = humidity; + this.pressure = pressure; + notifyObserver(); + } + + @Override + public void registerObserver(Observer o) { + observers.add(o); + } + + @Override + public void removeObserver(Observer o) { + int i = observers.indexOf(o); + if (i >= 0) { + observers.remove(i); + } + } + + @Override + public void notifyObserver() { + for (Observer o : observers) { + o.update(temperature, humidity, pressure); + } + } +} +``` + +```java +public interface Observer { + void update(float temp, float humidity, float pressure); +} +``` + +```java +public class StatisticsDisplay implements Observer { + + public StatisticsDisplay(Subject weatherData) { + weatherData.reisterObserver(this); + } + + @Override + public void update(float temp, float humidity, float pressure) { + System.out.println("StatisticsDisplay.update: " + temp + " " + humidity + " " + pressure); + } +} +``` + +```java +public class CurrentConditionsDisplay implements Observer { + + public CurrentConditionsDisplay(Subject weatherData) { + weatherData.registerObserver(this); + } + + @Override + public void update(float temp, float humidity, float pressure) { + System.out.println("CurrentConditionsDisplay.update: " + temp + " " + humidity + " " + pressure); + } +} +``` + +```java +public class WeatherStation { + public static void main(String[] args) { + WeatherData weatherData = new WeatherData(); + CurrentConditionsDisplay currentConditionsDisplay = new CurrentConditionsDisplay(weatherData); + StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData); + + weatherData.setMeasurements(0, 0, 0); + weatherData.setMeasurements(1, 1, 1); + } +} +``` + +```html +CurrentConditionsDisplay.update: 0.0 0.0 0.0 +StatisticsDisplay.update: 0.0 0.0 0.0 +CurrentConditionsDisplay.update: 1.0 1.0 1.0 +StatisticsDisplay.update: 1.0 1.0 1.0 +``` + +### JDK + +- [java.util.Observer](http://docs.oracle.com/javase/8/docs/api/java/util/Observer.html) +- [java.util.EventListener](http://docs.oracle.com/javase/8/docs/api/java/util/EventListener.html) +- [javax.servlet.http.HttpSessionBindingListener](http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpSessionBindingListener.html) +- [RxJava](https://github.com/ReactiveX/RxJava) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" new file mode 100644 index 00000000..f22b470c --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\247\243\351\207\212\345\231\250\346\250\241\345\274\217.md" @@ -0,0 +1,138 @@ +## 解释器(Interpreter) + +### 介绍 + +解释器模式(Interpreter Pattern)提供了评估语言的语法或表达式的方式,它属于行为型模式。这种模式实现了一个表达式接口,该接口解释一个特定的上下文。这种模式被用在 SQL 解析、符号处理引擎等。 + +### Intent + +为语言创建解释器,通常由语言的语法和语法分析来定义。 + +### Class Diagram + +- TerminalExpression:终结符表达式,每个终结符都需要一个 TerminalExpression。 +- Context:上下文,包含解释器之外的一些全局信息。 + +

+ +### Implementation + +以下是一个规则检验器实现,具有 and 和 or 规则,通过规则可以构建一颗解析树,用来检验一个文本是否满足解析树定义的规则。 + +例如一颗解析树为 D And (A Or (B C)),文本 "D A" 满足该解析树定义的规则。 + +这里的 Context 指的是 String。 + +```java +public abstract class Expression { + public abstract boolean interpret(String str); +} +``` + +```java +public class TerminalExpression extends Expression { + + private String literal = null; + + public TerminalExpression(String str) { + literal = str; + } + + public boolean interpret(String str) { + StringTokenizer st = new StringTokenizer(str); + while (st.hasMoreTokens()) { + String test = st.nextToken(); + if (test.equals(literal)) { + return true; + } + } + return false; + } +} +``` + +```java +public class AndExpression extends Expression { + + private Expression expression1 = null; + private Expression expression2 = null; + + public AndExpression(Expression expression1, Expression expression2) { + this.expression1 = expression1; + this.expression2 = expression2; + } + + public boolean interpret(String str) { + return expression1.interpret(str) && expression2.interpret(str); + } +} +``` + +```java +public class OrExpression extends Expression { + private Expression expression1 = null; + private Expression expression2 = null; + + public OrExpression(Expression expression1, Expression expression2) { + this.expression1 = expression1; + this.expression2 = expression2; + } + + public boolean interpret(String str) { + return expression1.interpret(str) || expression2.interpret(str); + } +} +``` + +```java +public class Client { + + /** + * 构建解析树 + */ + public static Expression buildInterpreterTree() { + // Literal + Expression terminal1 = new TerminalExpression("A"); + Expression terminal2 = new TerminalExpression("B"); + Expression terminal3 = new TerminalExpression("C"); + Expression terminal4 = new TerminalExpression("D"); + // B C + Expression alternation1 = new OrExpression(terminal2, terminal3); + // A Or (B C) + Expression alternation2 = new OrExpression(terminal1, alternation1); + // D And (A Or (B C)) + return new AndExpression(terminal4, alternation2); + } + + public static void main(String[] args) { + Expression define = buildInterpreterTree(); + String context1 = "D A"; + String context2 = "A B"; + System.out.println(define.interpret(context1)); + System.out.println(define.interpret(context2)); + } +} +``` + +```html +true +false +``` + +### JDK + +- [java.util.Pattern](http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html) +- [java.text.Normalizer](http://docs.oracle.com/javase/8/docs/api/java/text/Normalizer.html) +- All subclasses of [java.text.Format](http://docs.oracle.com/javase/8/docs/api/java/text/Format.html) +- [javax.el.ELResolver](http://docs.oracle.com/javaee/7/api/javax/el/ELResolver.html) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" new file mode 100644 index 00000000..bc5226de --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\256\277\351\227\256\350\200\205\346\250\241\345\274\217.md" @@ -0,0 +1,220 @@ +## 访问者(Visitor) + +### 介绍 + +在访问者模式(Visitor Pattern)中,我们使用了一个访问者类,它改变了元素类的执行算法。通过这种方式,元素的执行算法可以随着访问者改变而改变。这种类型的设计模式属于行为型模式。根据模式,元素对象已接受访问者对象,这样访问者对象就可以处理元素对象上的操作。 + +### Intent + +为一个对象结构(比如组合结构)增加新能力。 + +### Class Diagram + +- Visitor:访问者,为每一个 ConcreteElement 声明一个 visit 操作 +- ConcreteVisitor:具体访问者,存储遍历过程中的累计结果 +- ObjectStructure:对象结构,可以是组合结构,或者是一个集合。 + +

+ +### Implementation + +```java +public interface Element { + void accept(Visitor visitor); +} +``` + +```java +class CustomerGroup { + + private List customers = new ArrayList<>(); + + void accept(Visitor visitor) { + for (Customer customer : customers) { + customer.accept(visitor); + } + } + + void addCustomer(Customer customer) { + customers.add(customer); + } +} +``` + +```java +public class Customer implements Element { + + private String name; + private List orders = new ArrayList<>(); + + Customer(String name) { + this.name = name; + } + + String getName() { + return name; + } + + void addOrder(Order order) { + orders.add(order); + } + + public void accept(Visitor visitor) { + visitor.visit(this); + for (Order order : orders) { + order.accept(visitor); + } + } +} +``` + +```java +public class Order implements Element { + + private String name; + private List items = new ArrayList(); + + Order(String name) { + this.name = name; + } + + Order(String name, String itemName) { + this.name = name; + this.addItem(new Item(itemName)); + } + + String getName() { + return name; + } + + void addItem(Item item) { + items.add(item); + } + + public void accept(Visitor visitor) { + visitor.visit(this); + + for (Item item : items) { + item.accept(visitor); + } + } +} +``` + +```java +public class Item implements Element { + + private String name; + + Item(String name) { + this.name = name; + } + + String getName() { + return name; + } + + public void accept(Visitor visitor) { + visitor.visit(this); + } +} +``` + +```java +public interface Visitor { + void visit(Customer customer); + + void visit(Order order); + + void visit(Item item); +} +``` + +```java +public class GeneralReport implements Visitor { + + private int customersNo; + private int ordersNo; + private int itemsNo; + + public void visit(Customer customer) { + System.out.println(customer.getName()); + customersNo++; + } + + public void visit(Order order) { + System.out.println(order.getName()); + ordersNo++; + } + + public void visit(Item item) { + System.out.println(item.getName()); + itemsNo++; + } + + public void displayResults() { + System.out.println("Number of customers: " + customersNo); + System.out.println("Number of orders: " + ordersNo); + System.out.println("Number of items: " + itemsNo); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Customer customer1 = new Customer("customer1"); + customer1.addOrder(new Order("order1", "item1")); + customer1.addOrder(new Order("order2", "item1")); + customer1.addOrder(new Order("order3", "item1")); + + Order order = new Order("order_a"); + order.addItem(new Item("item_a1")); + order.addItem(new Item("item_a2")); + order.addItem(new Item("item_a3")); + Customer customer2 = new Customer("customer2"); + customer2.addOrder(order); + + CustomerGroup customers = new CustomerGroup(); + customers.addCustomer(customer1); + customers.addCustomer(customer2); + + GeneralReport visitor = new GeneralReport(); + customers.accept(visitor); + visitor.displayResults(); + } +} +``` + +```html +customer1 +order1 +item1 +order2 +item1 +order3 +item1 +customer2 +order_a +item_a1 +item_a2 +item_a3 +Number of customers: 2 +Number of orders: 4 +Number of items: 6 +``` + +### JDK + +- javax.lang.model.element.Element and javax.lang.model.element.ElementVisitor +- javax.lang.model.type.TypeMirror and javax.lang.model.type.TypeVisitor + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" new file mode 100644 index 00000000..5c1ae961 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\264\243\344\273\273\351\223\276\346\250\241\345\274\217.md" @@ -0,0 +1,147 @@ +## 责任链(Chain Of Responsibility) + +### 介绍 + +顾名思义,责任链模式(Chain of Responsibility Pattern)为请求创建了一个接收者对象的链。这种模式给予请求的类型,对请求的发送者和接收者进行解耦。这种类型的设计模式属于行为型模式。 + +在这种模式中,通常每个接收者都包含对另一个接收者的引用。如果一个对象不能处理该请求,那么它会把相同的请求传给下一个接收者,依此类推。 + +### Intent + +使多个对象都有机会处理请求,从而避免请求的发送者和接收者之间的耦合关系。将这些对象连成一条链,并沿着这条链发送该请求,直到有一个对象处理它为止。 + +### Class Diagram + +- Handler:定义处理请求的接口,并且实现后继链(successor) + +

+ +### Implementation + +```java +public abstract class Handler { + + protected Handler successor; + + + public Handler(Handler successor) { + this.successor = successor; + } + + + protected abstract void handleRequest(Request request); +} +``` + +```java +public class ConcreteHandler1 extends Handler { + + public ConcreteHandler1(Handler successor) { + super(successor); + } + + + @Override + protected void handleRequest(Request request) { + if (request.getType() == RequestType.TYPE1) { + System.out.println(request.getName() + " is handle by ConcreteHandler1"); + return; + } + if (successor != null) { + successor.handleRequest(request); + } + } +} +``` + +```java +public class ConcreteHandler2 extends Handler { + + public ConcreteHandler2(Handler successor) { + super(successor); + } + + + @Override + protected void handleRequest(Request request) { + if (request.getType() == RequestType.TYPE2) { + System.out.println(request.getName() + " is handle by ConcreteHandler2"); + return; + } + if (successor != null) { + successor.handleRequest(request); + } + } +} +``` + +```java +public class Request { + + private RequestType type; + private String name; + + + public Request(RequestType type, String name) { + this.type = type; + this.name = name; + } + + + public RequestType getType() { + return type; + } + + + public String getName() { + return name; + } +} + +``` + +```java +public enum RequestType { + TYPE1, TYPE2 +} +``` + +```java +public class Client { + + public static void main(String[] args) { + + Handler handler1 = new ConcreteHandler1(null); + Handler handler2 = new ConcreteHandler2(handler1); + + Request request1 = new Request(RequestType.TYPE1, "request1"); + handler2.handleRequest(request1); + + Request request2 = new Request(RequestType.TYPE2, "request2"); + handler2.handleRequest(request2); + } +} +``` + +```html +request1 is handle by ConcreteHandler1 +request2 is handle by ConcreteHandler2 +``` + +### JDK + +- [java.util.logging.Logger#log()](http://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html#log%28java.util.logging.Level,%20java.lang.String%29) +- [Apache Commons Chain](https://commons.apache.org/proper/commons-chain/index.html) +- [javax.servlet.Filter#doFilter()](http://docs.oracle.com/javaee/7/api/javax/servlet/Filter.html#doFilter-javax.servlet.ServletRequest-javax.servlet.ServletResponse-javax.servlet.FilterChain-) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" new file mode 100644 index 00000000..348b1653 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\350\277\255\344\273\243\345\231\250\346\250\241\345\274\217.md" @@ -0,0 +1,104 @@ +## 迭代器(Iterator) + +### 介绍 + +迭代器模式(Iterator Pattern)是 Java 和 .Net 编程环境中非常常用的设计模式。这种模式用于顺序访问集合对象的元素,不需要知道集合对象的底层表示。 + +### Intent + +提供一种顺序访问聚合对象元素的方法,并且不暴露聚合对象的内部表示。 + +### Class Diagram + +- Aggregate 是聚合类,其中 createIterator() 方法可以产生一个 Iterator; +- Iterator 主要定义了 hasNext() 和 next() 方法; +- Client 组合了 Aggregate,为了迭代遍历 Aggregate,也需要组合 Iterator。 + +
image-20191130164425351

+ +### Implementation + +```java +public interface Aggregate { + Iterator createIterator(); +} +``` + +```java +public class ConcreteAggregate implements Aggregate { + + private Integer[] items; + + public ConcreteAggregate() { + items = new Integer[10]; + for (int i = 0; i < items.length; i++) { + items[i] = i; + } + } + + @Override + public Iterator createIterator() { + return new ConcreteIterator(items); + } +} +``` + +```java +public interface Iterator { + + Item next(); + + boolean hasNext(); +} +``` + +```java +public class ConcreteIterator implements Iterator { + + private Item[] items; + private int position = 0; + + public ConcreteIterator(Item[] items) { + this.items = items; + } + + @Override + public Object next() { + return items[position++]; + } + + @Override + public boolean hasNext() { + return position < items.length; + } +} +``` + +```java +public class Client { + + public static void main(String[] args) { + Aggregate aggregate = new ConcreteAggregate(); + Iterator iterator = aggregate.createIterator(); + while (iterator.hasNext()) { + System.out.println(iterator.next()); + } + } +} +``` + +### JDK + +- [java.util.Iterator](http://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html) +- [java.util.Enumeration](http://docs.oracle.com/javase/8/docs/api/java/util/Enumeration.html) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" new file mode 100644 index 00000000..60d91e16 --- /dev/null +++ "b/\347\256\227\346\263\225\350\257\273\347\211\251/\350\256\276\350\256\241\346\250\241\345\274\217/\351\200\202\351\205\215\345\231\250\346\250\241\345\274\217.md" @@ -0,0 +1,87 @@ +## 适配器(Adapter) + +### 介绍 + +适配器模式(Adapter Pattern)是作为两个不兼容的接口之间的桥梁。这种类型的设计模式属于结构型模式,它结合了两个独立接口的功能。 + +这种模式涉及到一个单一的类,该类负责加入独立的或不兼容的接口功能。举个真实的例子,读卡器是作为内存卡和笔记本之间的适配器。您将内存卡插入读卡器,再将读卡器插入笔记本,这样就可以通过笔记本来读取内存卡。 + +### Intent + +把一个类接口转换成另一个用户需要的接口。 + +

+ +### Class Diagram + +

+ +### Implementation + +鸭子(Duck)和火鸡(Turkey)拥有不同的叫声,Duck 的叫声调用 quack() 方法,而 Turkey 调用 gobble() 方法。 + +要求将 Turkey 的 gobble() 方法适配成 Duck 的 quack() 方法,从而让火鸡冒充鸭子! + +```java +public interface Duck { + void quack(); +} +``` + +```java +public interface Turkey { + void gobble(); +} +``` + +```java +public class WildTurkey implements Turkey { + @Override + public void gobble() { + System.out.println("gobble!"); + } +} +``` + +```java +public class TurkeyAdapter implements Duck { + Turkey turkey; + + public TurkeyAdapter(Turkey turkey) { + this.turkey = turkey; + } + + @Override + public void quack() { + turkey.gobble(); + } +} +``` + +```java +public class Client { + public static void main(String[] args) { + Turkey turkey = new WildTurkey(); + Duck duck = new TurkeyAdapter(turkey); + duck.quack(); + } +} +``` + +### JDK + +- [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29) +- [java.util.Collections#list()](https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#list-java.util.Enumeration-) +- [java.util.Collections#enumeration()](https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#enumeration-java.util.Collection-) +- [javax.xml.bind.annotation.adapters.XMLAdapter](http://docs.oracle.com/javase/8/docs/api/javax/xml/bind/annotation/adapters/XmlAdapter.html#marshal-BoundType-) + +你可以通过下方扫码回复【进群】,加入我们的高端计算机学习群!以及下载超过 100 张高清思维导图! + +
+ +
+ + + + + diff --git "a/\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\351\255\224\345\205\275\344\270\226\347\225\214\345\271\263\350\241\241\347\256\227\346\263\225.zip" "b/\347\256\227\346\263\225\350\257\273\347\211\251/\351\255\224\345\205\275\344\270\226\347\225\214\345\271\263\350\241\241\347\256\227\346\263\225.zip" similarity index 100% rename from "\345\260\217\346\265\251\347\256\227\346\263\225\350\256\255\347\273\203/PART_3_\347\256\227\346\263\225\350\247\206\351\207\216\346\211\251\345\261\225/\351\255\224\345\205\275\344\270\226\347\225\214\345\271\263\350\241\241\347\256\227\346\263\225.zip" rename to "\347\256\227\346\263\225\350\257\273\347\211\251/\351\255\224\345\205\275\344\270\226\347\225\214\345\271\263\350\241\241\347\256\227\346\263\225.zip" diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/01.Docker \345\255\246\344\271\240\357\274\210\347\262\276\346\240\241\357\274\211/docker.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/01.Docker \345\255\246\344\271\240\357\274\210\347\262\276\346\240\241\357\274\211/docker.pdf" deleted file mode 100644 index 01836c08..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/01.Docker \345\255\246\344\271\240\357\274\210\347\262\276\346\240\241\357\274\211/docker.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/02.Git\345\237\272\347\241\200\357\274\210\347\262\276\346\240\241\357\274\211/Git\345\237\272\347\241\200.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/02.Git\345\237\272\347\241\200\357\274\210\347\262\276\346\240\241\357\274\211/Git\345\237\272\347\241\200.pdf" deleted file mode 100644 index 4dd87448..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/02.Git\345\237\272\347\241\200\357\274\210\347\262\276\346\240\241\357\274\211/Git\345\237\272\347\241\200.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/03.Java\345\271\266\345\217\221\344\275\223\347\263\273\357\274\210\347\262\276\346\240\241\357\274\211/Java\345\271\266\345\217\221\344\275\223\347\263\273.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/03.Java\345\271\266\345\217\221\344\275\223\347\263\273\357\274\210\347\262\276\346\240\241\357\274\211/Java\345\271\266\345\217\221\344\275\223\347\263\273.pdf" deleted file mode 100644 index ae8564d0..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/03.Java\345\271\266\345\217\221\344\275\223\347\263\273\357\274\210\347\262\276\346\240\241\357\274\211/Java\345\271\266\345\217\221\344\275\223\347\263\273.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/04.JVM\345\222\214\346\200\247\350\203\275\350\260\203\344\274\230\357\274\210\347\262\276\346\240\241\357\274\211/JVM\345\222\214\346\200\247\350\203\275\344\274\230\345\214\226.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/04.JVM\345\222\214\346\200\247\350\203\275\350\260\203\344\274\230\357\274\210\347\262\276\346\240\241\357\274\211/JVM\345\222\214\346\200\247\350\203\275\344\274\230\345\214\226.pdf" deleted file mode 100644 index f0dd74f4..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/04.JVM\345\222\214\346\200\247\350\203\275\350\260\203\344\274\230\357\274\210\347\262\276\346\240\241\357\274\211/JVM\345\222\214\346\200\247\350\203\275\344\274\230\345\214\226.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/05.Kafka\357\274\210\347\262\276\346\240\241\357\274\211/kafka.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/05.Kafka\357\274\210\347\262\276\346\240\241\357\274\211/kafka.pdf" deleted file mode 100644 index a31d1889..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/05.Kafka\357\274\210\347\262\276\346\240\241\357\274\211/kafka.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/06.Mysql \346\225\264\345\220\210\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/MySQL.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/06.Mysql \346\225\264\345\220\210\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/MySQL.pdf" deleted file mode 100644 index bd1b4fbd..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/06.Mysql \346\225\264\345\220\210\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/MySQL.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/07.Redis\350\256\276\350\256\241\344\270\216\345\256\236\347\216\260\357\274\210\347\262\276\346\240\241\357\274\211/Redis.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/07.Redis\350\256\276\350\256\241\344\270\216\345\256\236\347\216\260\357\274\210\347\262\276\346\240\241\357\274\211/Redis.pdf" deleted file mode 100644 index 1c07f734..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/07.Redis\350\256\276\350\256\241\344\270\216\345\256\236\347\216\260\357\274\210\347\262\276\346\240\241\357\274\211/Redis.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/07.Redis\350\256\276\350\256\241\344\270\216\345\256\236\347\216\260\357\274\210\347\262\276\346\240\241\357\274\211/Redis.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/07.Redis\350\256\276\350\256\241\344\270\216\345\256\236\347\216\260\357\274\210\347\262\276\346\240\241\357\274\211/Redis.png" deleted file mode 100644 index 43dfbf4c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/07.Redis\350\256\276\350\256\241\344\270\216\345\256\236\347\216\260\357\274\210\347\262\276\346\240\241\357\274\211/Redis.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/08.Springboot\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/springboot\345\255\246\344\271\240\347\254\224\350\256\260.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/08.Springboot\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/springboot\345\255\246\344\271\240\347\254\224\350\256\260.pdf" deleted file mode 100644 index b9dc61f2..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/08.Springboot\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/springboot\345\255\246\344\271\240\347\254\224\350\256\260.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/09.Spring\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/Spring\345\255\246\344\271\240\347\254\224\350\256\260.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/09.Spring\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/Spring\345\255\246\344\271\240\347\254\224\350\256\260.pdf" deleted file mode 100644 index 56efbe91..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/09.Spring\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/Spring\345\255\246\344\271\240\347\254\224\350\256\260.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/09.Spring\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/Spring\345\255\246\344\271\240\347\254\224\350\256\260.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/09.Spring\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/Spring\345\255\246\344\271\240\347\254\224\350\256\260.png" deleted file mode 100644 index cbd38e71..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/09.Spring\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/Spring\345\255\246\344\271\240\347\254\224\350\256\260.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266\357\274\210\347\262\276\346\240\241\357\274\211/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266\357\274\210\347\262\276\346\240\241\357\274\211/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266.pdf" deleted file mode 100644 index 7caf9869..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266\357\274\210\347\262\276\346\240\241\357\274\211/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266\357\274\210\347\262\276\346\240\241\357\274\211/algorithm.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266\357\274\210\347\262\276\346\240\241\357\274\211/algorithm.xmind" deleted file mode 100644 index 561896dd..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/11.\346\225\260\346\215\256\347\273\223\346\236\204\347\237\245\350\257\206\346\241\206\346\236\266\357\274\210\347\262\276\346\240\241\357\274\211/algorithm.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/12.\346\223\215\344\275\234\347\263\273\347\273\237\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\223\215\344\275\234\347\263\273\347\273\237.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/12.\346\223\215\344\275\234\347\263\273\347\273\237\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\223\215\344\275\234\347\263\273\347\273\237.pdf" deleted file mode 100644 index 3bf6ce20..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/12.\346\223\215\344\275\234\347\263\273\347\273\237\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\223\215\344\275\234\347\263\273\347\273\237.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/C++\350\257\255\346\263\225.JPG" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/C++\350\257\255\346\263\225.JPG" deleted file mode 100644 index f31376e2..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/C++\350\257\255\346\263\225.JPG" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/C++\350\257\255\346\263\2251.JPG" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/C++\350\257\255\346\263\2251.JPG" deleted file mode 100644 index 028e9c46..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/C++\350\257\255\346\263\2251.JPG" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/cpp.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/cpp.md" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/cpp.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/14.c++\345\237\272\347\241\200\345\222\214API\350\256\276\350\256\241 \357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/15.Hadoop\350\266\205\350\257\246\347\273\206\357\274\210\347\262\276\346\240\241\357\274\211/Hadoop.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/15.Hadoop\350\266\205\350\257\246\347\273\206\357\274\210\347\262\276\346\240\241\357\274\211/Hadoop.pdf" deleted file mode 100644 index b0807cd6..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/15.Hadoop\350\266\205\350\257\246\347\273\206\357\274\210\347\262\276\346\240\241\357\274\211/Hadoop.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/16.linux\345\237\272\347\241\200\347\237\245\350\257\206\357\274\210\347\262\276\346\240\241\357\274\211/linux\345\237\272\347\241\200\347\237\245\350\257\206.pdf" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/16.linux\345\237\272\347\241\200\347\237\245\350\257\206\357\274\210\347\262\276\346\240\241\357\274\211/linux\345\237\272\347\241\200\347\237\245\350\257\206.pdf" deleted file mode 100644 index 03c32791..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/16.linux\345\237\272\347\241\200\347\237\245\350\257\206\357\274\210\347\262\276\346\240\241\357\274\211/linux\345\237\272\347\241\200\347\237\245\350\257\206.pdf" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/17.js\347\237\245\350\257\206\345\255\246\344\271\240\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/17.js\347\237\245\350\257\206\345\255\246\344\271\240\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/18.Vue\346\241\206\346\236\266\346\200\235\347\273\264\345\257\274\345\233\276\347\254\224\350\256\260\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/18.Vue\346\241\206\346\236\266\346\200\235\347\273\264\345\257\274\345\233\276\347\254\224\350\256\260\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/19.CSS\345\222\214HTML\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/19.CSS\345\222\214HTML\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/20.28\345\274\240 \346\236\266\346\236\204\345\270\210\346\212\200\350\203\275\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/20.28\345\274\240 \346\236\266\346\236\204\345\270\210\346\212\200\350\203\275\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/21.\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234\350\266\205\345\205\250\345\255\246\344\271\240\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/21.\350\256\241\347\256\227\346\234\272\347\275\221\347\273\234\350\266\205\345\205\250\345\255\246\344\271\240\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/22.MySQL\351\253\230\347\272\247\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/22.MySQL\351\253\230\347\272\247\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/23.MySQL\345\237\272\347\241\200\344\270\216\346\200\247\350\203\275\344\274\230\345\214\226\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/23.MySQL\345\237\272\347\241\200\344\270\216\346\200\247\350\203\275\344\274\230\345\214\226\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/24.\346\225\260\345\255\246\350\266\205\345\205\250\345\257\274\345\233\276\345\220\210\351\233\206\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/24.\346\225\260\345\255\246\350\266\205\345\205\250\345\257\274\345\233\276\345\220\210\351\233\206\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/25.NPDP \347\237\245\350\257\206\344\275\223\347\263\273\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/25.NPDP \347\237\245\350\257\206\344\275\223\347\263\273\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/26.JAVA\351\235\242\350\257\225\346\200\235\347\273\264\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/26.JAVA\351\235\242\350\257\225\346\200\235\347\273\264\345\257\274\345\233\276\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/27.\346\267\261\345\272\246\345\255\246\344\271\240\345\233\276\345\203\217\347\256\227\346\263\225\351\235\242\350\257\225\351\242\230\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/27.\346\267\261\345\272\246\345\255\246\344\271\240\345\233\276\345\203\217\347\256\227\346\263\225\351\235\242\350\257\225\351\242\230\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/28.\345\260\217\347\231\275\347\232\204\345\211\215\347\253\257\345\257\274\345\233\276\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/28.\345\260\217\347\231\275\347\232\204\345\211\215\347\253\257\345\257\274\345\233\276\346\261\207\346\200\273\357\274\210\347\262\276\346\240\241\357\274\211/\346\226\207\344\273\266\350\277\207\345\244\247,\344\270\213\346\226\271\351\223\276\346\216\245\344\270\213\350\275\275.txt" deleted file mode 100644 index e69de29b..00000000 diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\345\216\213\345\212\233\346\265\213\350\257\225.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\345\216\213\345\212\233\346\265\213\350\257\225.xmind" deleted file mode 100644 index b71a7613..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\345\216\213\345\212\233\346\265\213\350\257\225.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\345\216\213\345\212\233\346\265\213\350\257\225\345\234\272\346\231\257.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\345\216\213\345\212\233\346\265\213\350\257\225\345\234\272\346\231\257.xmind" deleted file mode 100644 index f4921698..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\345\216\213\345\212\233\346\265\213\350\257\225\345\234\272\346\231\257.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\346\265\213\350\257\225\347\237\245\350\257\206\344\275\223\347\263\273.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\346\265\213\350\257\225\347\237\245\350\257\206\344\275\223\347\263\273.xmind" deleted file mode 100644 index 88ab620d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\346\265\213\350\257\225\347\237\245\350\257\206\344\275\223\347\263\273.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\347\247\273\345\212\250\345\256\242\346\210\267\347\253\257\351\200\232\347\224\250\346\265\213\350\257\225.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\347\247\273\345\212\250\345\256\242\346\210\267\347\253\257\351\200\232\347\224\250\346\265\213\350\257\225.xmind" deleted file mode 100644 index 20a9c9b5..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/29.\346\265\213\350\257\225\347\233\270\345\205\263/\347\247\273\345\212\250\345\256\242\346\210\267\347\253\257\351\200\232\347\224\250\346\265\213\350\257\225.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/30.Security\345\256\211\345\205\250\347\233\270\345\205\263/\345\256\211\345\205\250.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/30.Security\345\256\211\345\205\250\347\233\270\345\205\263/\345\256\211\345\205\250.xmind" deleted file mode 100644 index 2b0c0d39..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/30.Security\345\256\211\345\205\250\347\233\270\345\205\263/\345\256\211\345\205\250.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/Redis.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/Redis.md" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/Redis.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/Redis\345\206\205\345\255\230.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/Redis\345\206\205\345\255\230.png" deleted file mode 100644 index a5a180e3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/Redis\345\206\205\345\255\230.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/redis\345\206\205\345\255\230\344\274\230\345\214\226.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/redis\345\206\205\345\255\230\344\274\230\345\214\226.png" deleted file mode 100644 index 957035e2..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/redis\345\206\205\345\255\230\344\274\230\345\214\226.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\345\223\250\345\205\265.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\345\223\250\345\205\265.png" deleted file mode 100644 index 68d78bbc..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\345\223\250\345\205\265.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\345\244\215\345\210\266.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\345\244\215\345\210\266.png" deleted file mode 100644 index 962fa6c9..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\345\244\215\345\210\266.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\346\214\201\344\271\205\345\214\226.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\346\214\201\344\271\205\345\214\226.png" deleted file mode 100644 index a16eeb39..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\346\214\201\344\271\205\345\214\226.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\347\274\223\345\255\230\350\256\276\350\256\241.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\347\274\223\345\255\230\350\256\276\350\256\241.png" deleted file mode 100644 index dd622280..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\347\274\223\345\255\230\350\256\276\350\256\241.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\351\230\273\345\241\236.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\351\230\273\345\241\236.png" deleted file mode 100644 index 4668fa00..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/31.Redis\347\233\270\345\205\263/\351\230\273\345\241\236.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/32.Zookeeper\347\233\270\345\205\263/Zookeeper.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/32.Zookeeper\347\233\270\345\205\263/Zookeeper.xmind" deleted file mode 100644 index 2eaefb03..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/32.Zookeeper\347\233\270\345\205\263/Zookeeper.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/1.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/1.jpg" deleted file mode 100644 index c049cd6d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/1.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/2.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/2.jpg" deleted file mode 100644 index d1f2970f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/2.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/3.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/3.jpg" deleted file mode 100644 index 5d80eedf..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/3.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/4.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/4.jpg" deleted file mode 100644 index b0ab407b..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/4.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/5.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/5.jpg" deleted file mode 100644 index 2a287e72..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/5.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/6.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/6.jpg" deleted file mode 100644 index 27a2adec..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/6.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/Docker\347\256\200\344\273\213\345\222\214\345\237\272\346\234\254\346\246\202\345\277\265.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/Docker\347\256\200\344\273\213\345\222\214\345\237\272\346\234\254\346\246\202\345\277\265.png" deleted file mode 100644 index 166cb4a3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/Docker\347\256\200\344\273\213\345\222\214\345\237\272\346\234\254\346\246\202\345\277\265.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/docker.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/docker.md" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/docker.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/\345\205\266\344\273\226.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/\345\205\266\344\273\226.png" deleted file mode 100644 index 043533cb..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/\345\205\266\344\273\226.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/\351\225\234\345\203\217\344\270\216\345\256\271\345\231\250.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/\351\225\234\345\203\217\344\270\216\345\256\271\345\231\250.png" deleted file mode 100644 index 61e90362..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Docker/\351\225\234\345\203\217\344\270\216\345\256\271\345\231\250.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Microservice" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Microservice" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/33.\345\276\256\346\234\215\345\212\241\347\233\270\345\205\263/Microservice" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/34.IO\346\265\201\347\233\270\345\205\263/IO Pattern.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/34.IO\346\265\201\347\233\270\345\205\263/IO Pattern.xmind" deleted file mode 100644 index 5ad0178f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/34.IO\346\265\201\347\233\270\345\205\263/IO Pattern.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/Git_V2.16.2.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/Git_V2.16.2.png" deleted file mode 100644 index 77433ffa..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/Git_V2.16.2.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git \346\223\215\344\275\234\346\211\213\345\206\214.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git \346\223\215\344\275\234\346\211\213\345\206\214.xmind" deleted file mode 100644 index 4fb6209f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git \346\223\215\344\275\234\346\211\213\345\206\214.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git \347\232\204\344\275\277\347\224\250.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git \347\232\204\344\275\277\347\224\250.xmind" deleted file mode 100644 index 533f95e3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git \347\232\204\344\275\277\347\224\250.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git1.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git1.png" deleted file mode 100644 index b3fd11e6..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git1.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git\345\210\206\346\224\257\347\256\241\347\220\206\346\250\241\345\236\213.JPG" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git\345\210\206\346\224\257\347\256\241\347\220\206\346\250\241\345\236\213.JPG" deleted file mode 100644 index 3d6fd78c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git\345\210\206\346\224\257\347\256\241\347\220\206\346\250\241\345\236\213.JPG" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git\350\217\234\345\215\225.pptx" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git\350\217\234\345\215\225.pptx" deleted file mode 100644 index 97b50bbe..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/35.Git\347\233\270\345\205\263/git\350\217\234\345\215\225.pptx" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/36.Distributed/distributed.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/36.Distributed/distributed.xmind" deleted file mode 100644 index 5fa1206e..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/36.Distributed/distributed.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/37.Javascript \347\233\270\345\205\263/JavaScript.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/37.Javascript \347\233\270\345\205\263/JavaScript.xmind" deleted file mode 100644 index 181ca191..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/37.Javascript \347\233\270\345\205\263/JavaScript.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/37.Javascript \347\233\270\345\205\263/JavaScript\347\224\237\346\200\201\347\263\273\347\273\237.PNG" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/37.Javascript \347\233\270\345\205\263/JavaScript\347\224\237\346\200\201\347\263\273\347\273\237.PNG" deleted file mode 100644 index e53a8376..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/37.Javascript \347\233\270\345\205\263/JavaScript\347\224\237\346\200\201\347\263\273\347\273\237.PNG" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/38.Linux \347\233\270\345\205\263/Linux Security Coaching.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/38.Linux \347\233\270\345\205\263/Linux Security Coaching.png" deleted file mode 100644 index fcf9a683..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/38.Linux \347\233\270\345\205\263/Linux Security Coaching.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/38.Linux \347\233\270\345\205\263/Linux\345\255\246\344\271\240.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/38.Linux \347\233\270\345\205\263/Linux\345\255\246\344\271\240.xmind" deleted file mode 100644 index e6049a4d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/38.Linux \347\233\270\345\205\263/Linux\345\255\246\344\271\240.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/39.SEO \347\233\270\345\205\263/SEO\347\231\276\347\247\221.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/39.SEO \347\233\270\345\205\263/SEO\347\231\276\347\247\221.xmind" deleted file mode 100644 index da3902c5..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/39.SEO \347\233\270\345\205\263/SEO\347\231\276\347\247\221.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/39.SEO \347\233\270\345\205\263/SEO\347\233\270\345\205\263.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/39.SEO \347\233\270\345\205\263/SEO\347\233\270\345\205\263.xmind" deleted file mode 100644 index da1d2400..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/39.SEO \347\233\270\345\205\263/SEO\347\233\270\345\205\263.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/40.javaweb \345\272\224\347\224\250\345\256\211\345\205\250/JavaWeb\345\272\224\347\224\250\345\256\211\345\205\250.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/40.javaweb \345\272\224\347\224\250\345\256\211\345\205\250/JavaWeb\345\272\224\347\224\250\345\256\211\345\205\250.xmind" deleted file mode 100644 index 7a04e8d8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/40.javaweb \345\272\224\347\224\250\345\256\211\345\205\250/JavaWeb\345\272\224\347\224\250\345\256\211\345\205\250.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/40.javaweb \345\272\224\347\224\250\345\256\211\345\205\250/nmap\346\200\235\347\273\264\345\257\274\345\233\276.zip" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/40.javaweb \345\272\224\347\224\250\345\256\211\345\205\250/nmap\346\200\235\347\273\264\345\257\274\345\233\276.zip" deleted file mode 100644 index 9f181680..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/40.javaweb \345\272\224\347\224\250\345\256\211\345\205\250/nmap\346\200\235\347\273\264\345\257\274\345\233\276.zip" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/41.Nodejs \347\233\270\345\205\263/Nodejs.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/41.Nodejs \347\233\270\345\205\263/Nodejs.xmind" deleted file mode 100644 index d9b29b70..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/41.Nodejs \347\233\270\345\205\263/Nodejs.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/Java.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/Java.xmind" deleted file mode 100644 index f8ff1629..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/Java.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/NoSQL \351\235\236\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/NoSQL \351\235\236\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223.xmind" deleted file mode 100644 index 6f46f2a8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/NoSQL \351\235\236\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/RESTful.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/RESTful.xmind" deleted file mode 100644 index 524087b7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/RESTful.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java NIO,socket.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java NIO,socket.xmind" deleted file mode 100644 index dd504ede..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java NIO,socket.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\345\210\206\345\270\203\345\274\217\347\263\273\347\273\237.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\345\210\206\345\270\203\345\274\217\347\263\273\347\273\237.xmind" deleted file mode 100644 index f20cacad..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\345\210\206\345\270\203\345\274\217\347\263\273\347\273\237.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\345\271\266\345\217\221(\345\220\253volatile,\345\215\225\344\276\213,\347\272\277\347\250\213\346\261\240,\346\266\210\346\201\257\351\230\237\345\210\227,\344\272\213\345\212\241).xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\345\271\266\345\217\221(\345\220\253volatile,\345\215\225\344\276\213,\347\272\277\347\250\213\346\261\240,\346\266\210\346\201\257\351\230\237\345\210\227,\344\272\213\345\212\241).xmind" deleted file mode 100644 index 77563bd7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\345\271\266\345\217\221(\345\220\253volatile,\345\215\225\344\276\213,\347\272\277\347\250\213\346\261\240,\346\266\210\346\201\257\351\230\237\345\210\227,\344\272\213\345\212\241).xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\212\200\346\234\257\350\267\257\347\272\277.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\212\200\346\234\257\350\267\257\347\272\277.xmind" deleted file mode 100644 index 9783f823..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\212\200\346\234\257\350\267\257\347\272\277.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\234\215\345\212\241\347\253\257\350\204\232\346\211\213\346\236\266.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\234\215\345\212\241\347\253\257\350\204\232\346\211\213\346\236\266.xmind" deleted file mode 100644 index df6a76f3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\234\215\345\212\241\347\253\257\350\204\232\346\211\213\346\236\266.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\236\266\346\236\204\347\233\270\345\205\263.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\236\266\346\236\204\347\233\270\345\205\263.xmind" deleted file mode 100644 index 70b5ca84..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/java\346\236\266\346\236\204\347\233\270\345\205\263.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/jvm\347\233\270\345\205\263.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/jvm\347\233\270\345\205\263.xmind" deleted file mode 100644 index 0c175d1c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/jvm\347\233\270\345\205\263.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/log.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/log.xmind" deleted file mode 100644 index 9270afc7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/log.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/log4j.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/log4j.xmind" deleted file mode 100644 index 45c9441b..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/log4j.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/spring-shiro \347\233\270\345\205\263.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/spring-shiro \347\233\270\345\205\263.xmind" deleted file mode 100644 index b58bc2b5..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/spring-shiro \347\233\270\345\205\263.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\343\200\220Shiro-\346\265\201\347\250\213\343\200\221\345\256\211\345\205\250\346\241\206\346\236\266&cas\345\215\225\347\202\271\347\231\273\345\275\225.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\343\200\220Shiro-\346\265\201\347\250\213\343\200\221\345\256\211\345\205\250\346\241\206\346\236\266&cas\345\215\225\347\202\271\347\231\273\345\275\225.xmind" deleted file mode 100644 index cc291f51..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\343\200\220Shiro-\346\265\201\347\250\213\343\200\221\345\256\211\345\205\250\346\241\206\346\236\266&cas\345\215\225\347\202\271\347\231\273\345\275\225.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\343\200\220Shiro-\351\205\215\347\275\256\343\200\221\345\256\211\345\205\250\346\241\206\346\236\266&cas\345\215\225\347\202\271\347\231\273\345\275\225.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\343\200\220Shiro-\351\205\215\347\275\256\343\200\221\345\256\211\345\205\250\346\241\206\346\236\266&cas\345\215\225\347\202\271\347\231\273\345\275\225.xmind" deleted file mode 100644 index 8f0eb40a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\343\200\220Shiro-\351\205\215\347\275\256\343\200\221\345\256\211\345\205\250\346\241\206\346\236\266&cas\345\215\225\347\202\271\347\231\273\345\275\225.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\344\272\213\345\212\241\347\233\270\345\205\263.xlsx" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\344\272\213\345\212\241\347\233\270\345\205\263.xlsx" deleted file mode 100644 index 1cd08375..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\344\272\213\345\212\241\347\233\270\345\205\263.xlsx" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\345\212\240\345\257\206 \350\247\243\347\240\201.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\345\212\240\345\257\206 \350\247\243\347\240\201.xmind" deleted file mode 100644 index ef54d0fc..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\345\212\240\345\257\206 \350\247\243\347\240\201.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\345\256\211\345\205\250-\345\257\206\347\240\201.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\345\256\211\345\205\250-\345\257\206\347\240\201.xmind" deleted file mode 100644 index c3ffd75f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\345\256\211\345\205\250-\345\257\206\347\240\201.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\216\250\351\200\201\346\212\200\346\234\257,\346\234\215\345\212\241\347\253\257push,\345\256\236\346\227\266\345\214\226.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\216\250\351\200\201\346\212\200\346\234\257,\346\234\215\345\212\241\347\253\257push,\345\256\236\346\227\266\345\214\226.xmind" deleted file mode 100644 index 46dd28a0..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\216\250\351\200\201\346\212\200\346\234\257,\346\234\215\345\212\241\347\253\257push,\345\256\236\346\227\266\345\214\226.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\225\260\346\215\256\345\272\223\347\233\270\345\205\263.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\225\260\346\215\256\345\272\223\347\233\270\345\205\263.xmind" deleted file mode 100644 index 6f8d7d43..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\225\260\346\215\256\345\272\223\347\233\270\345\205\263.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\245\274\345\256\207\346\231\272\350\203\275\345\214\226\350\277\220\347\273\264\347\263\273\347\273\237-\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\245\274\345\256\207\346\231\272\350\203\275\345\214\226\350\277\220\347\273\264\347\263\273\347\273\237-\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.xmind" deleted file mode 100644 index 7f2255c9..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\346\245\274\345\256\207\346\231\272\350\203\275\345\214\226\350\277\220\347\273\264\347\263\273\347\273\237-\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\211\251\350\201\224\347\275\221\347\233\270\345\205\263\350\277\220\347\273\264\347\263\273\347\273\237.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\211\251\350\201\224\347\275\221\347\233\270\345\205\263\350\277\220\347\273\264\347\263\273\347\273\237.xmind" deleted file mode 100644 index a735bf47..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\211\251\350\201\224\347\275\221\347\233\270\345\205\263\350\277\220\347\273\264\347\263\273\347\273\237.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\225\214\351\235\242&\345\220\216\345\217\260\347\232\204\345\220\210\345\271\266\344\270\216\345\210\206\347\246\273.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\225\214\351\235\242&\345\220\216\345\217\260\347\232\204\345\220\210\345\271\266\344\270\216\345\210\206\347\246\273.xmind" deleted file mode 100644 index 1eed9da8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\225\214\351\235\242&\345\220\216\345\217\260\347\232\204\345\220\210\345\271\266\344\270\216\345\210\206\347\246\273.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\274\223\345\255\230\346\234\215\345\212\241\346\212\200\346\234\257.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\274\223\345\255\230\346\234\215\345\212\241\346\212\200\346\234\257.xmind" deleted file mode 100644 index 59d863a2..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\274\223\345\255\230\346\234\215\345\212\241\346\212\200\346\234\257.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\275\221\347\273\234\347\274\226\347\250\213.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\275\221\347\273\234\347\274\226\347\250\213.xmind" deleted file mode 100644 index 8de8ccfd..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\347\275\221\347\273\234\347\274\226\347\250\213.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\256\276\350\256\241\346\250\241\345\274\217-23.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\256\276\350\256\241\346\250\241\345\274\217-23.xmind" deleted file mode 100644 index de091447..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\256\276\350\256\241\346\250\241\345\274\217-23.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\256\276\350\256\241\346\250\241\345\274\217\350\256\244\350\257\206.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\256\276\350\256\241\346\250\241\345\274\217\350\256\244\350\257\206.xmind" deleted file mode 100644 index b98ad039..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\256\276\350\256\241\346\250\241\345\274\217\350\256\244\350\257\206.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\272\253\344\273\275\350\256\244\350\257\201.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\272\253\344\273\275\350\256\244\350\257\201.xmind" deleted file mode 100644 index 835b395a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/42.Java\346\212\200\346\234\257\347\233\270\345\205\263/\345\220\216\347\253\257/\350\272\253\344\273\275\350\256\244\350\257\201.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/1.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/1.md" deleted file mode 100644 index 30d74d25..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/1.md" +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/Kafka.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/Kafka.xmind" deleted file mode 100644 index 879d6a34..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/Kafka.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/MQ.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/MQ.xmind" deleted file mode 100644 index 17359f6d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/43.\344\270\255\351\227\264\344\273\266\347\233\270\345\205\263/MQ.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/44.\347\233\221\346\216\247\347\233\270\345\205\263/monitor.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/44.\347\233\221\346\216\247\347\233\270\345\205\263/monitor.xmind" deleted file mode 100644 index a27a592c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/44.\347\233\221\346\216\247\347\233\270\345\205\263/monitor.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261465529.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261465529.jpg" deleted file mode 100644 index 0eac00f3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261465529.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261467755.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261467755.jpg" deleted file mode 100644 index 6c11ef21..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261467755.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261471948.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261471948.jpg" deleted file mode 100644 index e78a8a7f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261471948.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261475857.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261475857.jpg" deleted file mode 100644 index 5c97cdb9..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261475857.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261479530.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261479530.jpg" deleted file mode 100644 index 7b7cbc7e..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261479530.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261484177.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261484177.jpg" deleted file mode 100644 index 4f813c68..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261484177.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261487767.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261487767.jpg" deleted file mode 100644 index ada092e3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261487767.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261490937.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261490937.jpg" deleted file mode 100644 index 176200ae..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261490937.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261494981.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261494981.jpg" deleted file mode 100644 index 455c43e6..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261494981.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261498535.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261498535.jpg" deleted file mode 100644 index 049b306a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261498535.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261502948.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261502948.jpg" deleted file mode 100644 index d1dd4762..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261502948.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261506823.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261506823.jpg" deleted file mode 100644 index 4a875de0..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261506823.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261510612.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261510612.jpg" deleted file mode 100644 index bdc1f509..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261510612.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261514286.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261514286.jpg" deleted file mode 100644 index 6d1b8373..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261514286.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261518395.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261518395.jpg" deleted file mode 100644 index df23dfae..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/mmexport1508261518395.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/readme.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/readme.md" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/readme.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Dict\345\222\214Set\347\261\273\345\236\213.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Dict\345\222\214Set\347\261\273\345\236\213.jpg" deleted file mode 100644 index 0bf69ed7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Dict\345\222\214Set\347\261\273\345\236\213.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/List\345\222\214Tuple\347\261\273\345\236\213.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/List\345\222\214Tuple\347\261\273\345\236\213.jpg" deleted file mode 100644 index 285cb416..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/List\345\222\214Tuple\347\261\273\345\236\213.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\207\275\346\225\260.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\207\275\346\225\260.jpg" deleted file mode 100644 index e83e9482..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\207\275\346\225\260.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\210\207\347\211\207.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\210\207\347\211\207.jpg" deleted file mode 100644 index ac3e86b8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\210\207\347\211\207.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\210\227\350\241\250\347\224\237\346\210\220\345\274\217.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\210\227\350\241\250\347\224\237\346\210\220\345\274\217.jpg" deleted file mode 100644 index 5dd75663..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\345\210\227\350\241\250\347\224\237\346\210\220\345\274\217.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\347\224\237\346\210\220\345\231\250.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\347\224\237\346\210\220\345\231\250.jpg" deleted file mode 100644 index cf01605f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\347\224\237\346\210\220\345\231\250.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\257\255\346\263\225\345\233\276.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\257\255\346\263\225\345\233\276.jpg" deleted file mode 100644 index 78d4f0c7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\257\255\346\263\225\345\233\276.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\277\224\345\233\236\345\207\275\346\225\260\345\222\214\351\227\255\345\214\205.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\277\224\345\233\236\345\207\275\346\225\260\345\222\214\351\227\255\345\214\205.jpg" deleted file mode 100644 index 5428611e..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\277\224\345\233\236\345\207\275\346\225\260\345\222\214\351\227\255\345\214\205.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\277\255\344\273\243.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\277\255\344\273\243.jpg" deleted file mode 100644 index 43fd5c38..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\350\277\255\344\273\243.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\351\253\230\351\230\266\345\207\275\346\225\260.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\351\253\230\351\230\266\345\207\275\346\225\260.jpg" deleted file mode 100644 index 32dcf3b4..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/Python\351\253\230\351\230\266\345\207\275\346\225\260.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/readme.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/readme.md" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/readme.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/\345\217\230\351\207\217\345\222\214\346\225\260\346\215\256\347\261\273\345\236\213.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/\345\217\230\351\207\217\345\222\214\346\225\260\346\215\256\347\261\273\345\236\213.jpg" deleted file mode 100644 index cb740b0a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/\345\217\230\351\207\217\345\222\214\346\225\260\346\215\256\347\261\273\345\236\213.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/\345\276\252\347\216\257\350\257\255\345\217\245.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/\345\276\252\347\216\257\350\257\255\345\217\245.jpg" deleted file mode 100644 index 4d0105dd..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/45.python\347\233\270\345\205\263/\350\237\222\350\233\207\345\237\272\347\241\200/\345\276\252\347\216\257\350\257\255\345\217\245.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/46.\346\225\260\346\215\256\345\272\223\347\233\270\345\205\263\357\274\210\345\210\206\345\272\223\345\210\206\350\241\250\357\274\211/db.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/46.\346\225\260\346\215\256\345\272\223\347\233\270\345\205\263\357\274\210\345\210\206\345\272\223\345\210\206\350\241\250\357\274\211/db.xmind" deleted file mode 100644 index 1b0839d5..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/46.\346\225\260\346\215\256\345\272\223\347\233\270\345\205\263\357\274\210\345\210\206\345\272\223\345\210\206\350\241\250\357\274\211/db.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/47.NetworkProtocol/Network Protocol.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/47.NetworkProtocol/Network Protocol.xmind" deleted file mode 100644 index 0412afe9..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/47.NetworkProtocol/Network Protocol.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/48.MYSQL \347\233\270\345\205\263/MySql.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/48.MYSQL \347\233\270\345\205\263/MySql.xmind" deleted file mode 100644 index 8542c65d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/48.MYSQL \347\233\270\345\205\263/MySql.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/Ajax.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/Ajax.jpg" deleted file mode 100644 index 610e56bf..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/Ajax.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/DOM\346\223\215\344\275\2340.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/DOM\346\223\215\344\275\2340.jpg" deleted file mode 100644 index 0a406f96..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/DOM\346\223\215\344\275\2340.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/DOM\346\223\215\344\275\2341.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/DOM\346\223\215\344\275\2341.jpg" deleted file mode 100644 index 30ef4af7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/DOM\346\223\215\344\275\2341.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/Jquery\344\270\255\345\277\203\344\270\273\351\242\230.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/Jquery\344\270\255\345\277\203\344\270\273\351\242\230.jpg" deleted file mode 100644 index 79753d88..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/Jquery\344\270\255\345\277\203\344\270\273\351\242\230.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/call,apply,bind.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/call,apply,bind.xmind" deleted file mode 100644 index 5a666385..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/call,apply,bind.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/cookie & session.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/cookie & session.xmind" deleted file mode 100644 index 1e30d776..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/cookie & session.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/css\345\256\232\344\275\215.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/css\345\256\232\344\275\215.xmind" deleted file mode 100644 index 62efe76f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/css\345\256\232\344\275\215.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/generator-gulp-angular,Gulp.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/generator-gulp-angular,Gulp.xmind" deleted file mode 100644 index da8f7f7c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/generator-gulp-angular,Gulp.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript Html jsp \346\223\215\347\272\265\345\205\263\347\263\273.txt" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript Html jsp \346\223\215\347\272\265\345\205\263\347\263\273.txt" deleted file mode 100644 index 864fe3a4..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript Html jsp \346\223\215\347\272\265\345\205\263\347\263\273.txt" +++ /dev/null @@ -1,95 +0,0 @@ -javaScript 可以操纵html -jsp(EL,<%>,标签库)可以动态嵌入到html,javaScript - -jsp -tomcat解释-> 静态存在与html中 -> javaScript与Html同时存在客户端->javaScript可动态操纵Html - -jsp九大内置对象、四种作用域 - -JSP中九大内置对象为: - 1、request 请求对象  类型 javax.servlet.ServletRequest 作用域 Request - 2、response 响应对象 类型 javax.servlet.SrvletResponse 作用域 Page - 3、pageContext 页面上下文对象 类型 javax.servlet.jsp.PageContext 作用域 Page - 4、session 会话对象 类型 javax.servlet.http.HttpSession 作用域 Session - 5、application 应用程序对象 类型 javax.servlet.ServletContext 作用域 Application - 6、out 输出对象 类型 javax.servlet.jsp.JspWriter 作用域 Page - 7、config 配置对象 类型 javax.servlet.ServletConfig 作用域 Page - 8、page 页面对象 类型 javax.lang.Object 作用域 Page - 9、exception 例外对象 类型 javax.lang.Throwable 作用域 page - -page:当前页面,也就是只要跳到别的页面就失效了 -request:一次会话,简单的理解就是一次请求范围内有效 -session:浏览器进程,只要当前页面没有被关闭(没有被程序强制清除),不管怎么跳转都是有效的 -application:服务器,只要服务器没有重启(没有被程序强制清除),数据就有效 - - -JavaScript 参考手册 -本部分提供完整的 JavaScript 参考手册: -JavaScript 本地对象和内置对象 -Browser 对象(BOM) -HTML DOM 对象 -JavaScript 对象参考手册 -本参考手册描述每个对象的属性和方法,并提供实例。 -Array -Boolean -Date -Math -Number -String -RegExp -Global -Browser 对象参考手册 -本参考手册描述每个对象的属性和方法,并提供实例。 -Window -Navigator -Screen -History -Location -HTML DOM 对象参考手册 -本参考手册描述每个对象的属性和方法,并提供实例。 -Document -Anchor -Area -Base -Body -Button -Canvas -Event -Form -Frame -Frameset -IFrame -Image -Input Button -Input Checkbox -Input File -Input Hidden -Input Password -Input Radio -Input Reset -Input Submit -Input Text -Link -Meta -Object -Option -Select -Style -Table -TableCell -TableRow -Textarea -相关页面 -如需更多有关 JavaScript 对象的知识,请阅读 JavaScript 高级教程中的相关内容: -面向对象技术 -对象应用 -对象类型 -对象作用域 -定义类或对象 -修改对象 -如需更多有关 DOM 的知识,请访问 W3School 提供的 XML DOM 教程: -XML DOM 教程 -XML DOM 参考手册 -如需更多有关 jQuery 的知识,请访问 W3School 提供的 jQuery 教程: -jQuery 教程 -jQuery 参考手册 -注释:jQuery 是一个 JavaScript 库,它极大地简化了 JavaScript 编程。 \ No newline at end of file diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/BOM\345\222\214DOM\347\232\204\347\273\223\346\236\204\345\205\263\347\263\273\347\244\272\346\204\217\345\233\276.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/BOM\345\222\214DOM\347\232\204\347\273\223\346\236\204\345\205\263\347\263\273\347\244\272\346\204\217\345\233\276.jpg" deleted file mode 100644 index f857a95f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/BOM\345\222\214DOM\347\232\204\347\273\223\346\236\204\345\205\263\347\263\273\347\244\272\346\204\217\345\233\276.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javaScript\350\277\220\347\256\227\347\254\246.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javaScript\350\277\220\347\256\227\347\254\246.gif" deleted file mode 100644 index 824da05a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javaScript\350\277\220\347\256\227\347\254\246.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\207\275\346\225\260\345\237\272\347\241\200.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\207\275\346\225\260\345\237\272\347\241\200.gif" deleted file mode 100644 index 81053564..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\207\275\346\225\260\345\237\272\347\241\200.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\217\230\351\207\217.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\217\230\351\207\217.gif" deleted file mode 100644 index 05246695..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\217\230\351\207\217.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\237\272\347\241\200DOM\346\223\215\344\275\234.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\237\272\347\241\200DOM\346\223\215\344\275\234.gif" deleted file mode 100644 index 6fd30d14..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\237\272\347\241\200DOM\346\223\215\344\275\234.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\255\227\347\254\246\344\270\262\345\207\275\346\225\260.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\255\227\347\254\246\344\270\262\345\207\275\346\225\260.gif" deleted file mode 100644 index e452c1fb..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\345\255\227\347\254\246\344\270\262\345\207\275\346\225\260.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\225\260\347\273\204.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\225\260\347\273\204.gif" deleted file mode 100644 index 1178da72..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\225\260\347\273\204.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.gif" deleted file mode 100644 index 386fd6ad..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\265\201\347\250\213\350\257\255\345\217\245.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\265\201\347\250\213\350\257\255\345\217\245.gif" deleted file mode 100644 index 8a921b3f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/javascript\346\265\201\347\250\213\350\257\255\345\217\245.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/window\345\257\271\350\261\241.gif" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/window\345\257\271\350\261\241.gif" deleted file mode 100644 index 8ff9f0d7..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/window\345\257\271\350\261\241.gif" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/\346\223\215\344\275\234HTML jQuery.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/\346\223\215\344\275\234HTML jQuery.png" deleted file mode 100644 index 31d703ab..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/\346\223\215\344\275\234HTML jQuery.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/\346\223\215\344\275\234HTML javascript Dom.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/\346\223\215\344\275\234HTML javascript Dom.png" deleted file mode 100644 index 1f988701..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript-png/\346\223\215\344\275\234HTML javascript Dom.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript.xmind" deleted file mode 100644 index 09431492..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript\344\272\213\344\273\266.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript\344\272\213\344\273\266.xmind" deleted file mode 100644 index e2cd1caf..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript\344\272\213\344\273\266.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript\345\216\237\345\236\213\351\223\276.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript\345\216\237\345\236\213\351\223\276.xmind" deleted file mode 100644 index ea16bfa3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/javaScript\345\216\237\345\236\213\351\223\276.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/js jsp html \345\205\263\347\263\273.pptx" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/js jsp html \345\205\263\347\263\273.pptx" deleted file mode 100644 index e554e03a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/js jsp html \345\205\263\347\263\273.pptx" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/readme.md" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/readme.md" deleted file mode 100644 index 8b137891..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/readme.md" +++ /dev/null @@ -1 +0,0 @@ - diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/web\350\267\250\345\237\237.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/web\350\267\250\345\237\237.xmind" deleted file mode 100644 index 0541752a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/web\350\267\250\345\237\237.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\345\256\211\345\205\250 \350\256\244\350\257\201.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\345\256\211\345\205\250 \350\256\244\350\257\201.xmind" deleted file mode 100644 index 1137d326..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\345\256\211\345\205\250 \350\256\244\350\257\201.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-all.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-all.xmind" deleted file mode 100644 index 48f45ccf..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-all.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-lib.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-lib.xmind" deleted file mode 100644 index a9dfc3e8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-lib.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\345\270\270\350\257\206.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\345\270\270\350\257\206.xmind" deleted file mode 100644 index 507c5206..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\345\270\270\350\257\206.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\345\272\224\347\224\250.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\345\272\224\347\224\250.xmind" deleted file mode 100644 index 7008fa68..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\345\272\224\347\224\250.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\346\241\206\346\236\266.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\346\241\206\346\236\266.xmind" deleted file mode 100644 index ffa96fcc..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\212\200\346\234\257-\346\241\206\346\236\266.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\241\206\346\236\266\351\200\211\345\236\213.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\241\206\346\236\266\351\200\211\345\236\213.xmind" deleted file mode 100644 index a7f2a79c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\211\215\347\253\257\346\241\206\346\236\266\351\200\211\345\236\213.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\212\250\346\200\201this\345\200\274.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\212\250\346\200\201this\345\200\274.xmind" deleted file mode 100644 index 82ba5c70..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\345\212\250\346\200\201this\345\200\274.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\351\200\211\346\213\251\345\231\250.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\351\200\211\346\213\251\345\231\250.jpg" deleted file mode 100644 index b681a3be..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/49.\345\211\215\347\253\257\347\233\270\345\205\263/\351\200\211\346\213\251\345\231\250.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/ABP\346\241\206\346\236\266\347\232\204\345\255\246\344\271\240\350\267\257\347\272\277\345\233\276-\347\276\244\345\217\213\347\211\210.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/ABP\346\241\206\346\236\266\347\232\204\345\255\246\344\271\240\350\267\257\347\272\277\345\233\276-\347\276\244\345\217\213\347\211\210.xmind" deleted file mode 100644 index dab9efc3..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/ABP\346\241\206\346\236\266\347\232\204\345\255\246\344\271\240\350\267\257\347\272\277\345\233\276-\347\276\244\345\217\213\347\211\210.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/App Store\346\234\200\346\226\260\345\256\241\346\240\270\346\214\207\345\215\227.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/App Store\346\234\200\346\226\260\345\256\241\346\240\270\346\214\207\345\215\227.xmind" deleted file mode 100644 index 002cf89d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/App Store\346\234\200\346\226\260\345\256\241\346\240\270\346\214\207\345\215\227.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Asp.net Core Architecture.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Asp.net Core Architecture.png" deleted file mode 100644 index e166163e..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Asp.net Core Architecture.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/C Sharp\347\274\226\350\257\221.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/C Sharp\347\274\226\350\257\221.png" deleted file mode 100644 index bb10b608..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/C Sharp\347\274\226\350\257\221.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/C#\345\205\250\346\240\210.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/C#\345\205\250\346\240\210.png" deleted file mode 100644 index 6df65cf0..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/C#\345\205\250\346\240\210.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Computer.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Computer.xmind" deleted file mode 100644 index cb780e20..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Computer.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/DB(sql server).png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/DB(sql server).png" deleted file mode 100644 index 9f90750c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/DB(sql server).png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Development Stack.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Development Stack.png" deleted file mode 100644 index c9aa13ae..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Development Stack.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/JavaWeb\345\272\224\347\224\250\345\256\211\345\205\250.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/JavaWeb\345\272\224\347\224\250\345\256\211\345\205\250.png" deleted file mode 100644 index 1e938567..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/JavaWeb\345\272\224\347\224\250\345\256\211\345\205\250.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Nmap \346\200\235\347\273\264\345\257\274\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Nmap \346\200\235\347\273\264\345\257\274\345\233\276.png" deleted file mode 100644 index 7f78aae4..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Nmap \346\200\235\347\273\264\345\257\274\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/PHP\344\273\243\347\240\201\345\256\241\350\256\241\350\204\221\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/PHP\344\273\243\347\240\201\345\256\241\350\256\241\350\204\221\345\233\276.png" deleted file mode 100644 index 6b543f20..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/PHP\344\273\243\347\240\201\345\256\241\350\256\241\350\204\221\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Redis.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Redis.png" deleted file mode 100644 index 1e23033a..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Redis.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/SQLmap\350\204\221\345\233\276.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/SQLmap\350\204\221\345\233\276.jpg" deleted file mode 100644 index deae31d6..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/SQLmap\350\204\221\345\233\276.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/SSRF\350\204\221\345\233\276.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/SSRF\350\204\221\345\233\276.jpg" deleted file mode 100644 index 8a3670ac..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/SSRF\350\204\221\345\233\276.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/WPF\344\275\223\347\263\273\347\273\223\346\236\204.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/WPF\344\275\223\347\263\273\347\273\223\346\236\204.png" deleted file mode 100644 index f78c4ed8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/WPF\344\275\223\347\263\273\347\273\223\346\236\204.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Web Front End Stack.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Web Front End Stack.png" deleted file mode 100644 index 172b9d05..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Web Front End Stack.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Web\345\272\224\347\224\250\345\256\211\345\205\250(By Neeao).jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Web\345\272\224\347\224\250\345\256\211\345\205\250(By Neeao).jpg" deleted file mode 100644 index 25520a94..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/Web\345\272\224\347\224\250\345\256\211\345\205\250(By Neeao).jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XML\345\256\211\345\205\250\346\261\207\346\200\273.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XML\345\256\211\345\205\250\346\261\207\346\200\273.png" deleted file mode 100644 index 98960186..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XML\345\256\211\345\205\250\346\261\207\346\200\273.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XSS2.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XSS2.png" deleted file mode 100644 index ce9210d1..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XSS2.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XSS\350\204\221\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XSS\350\204\221\345\233\276.png" deleted file mode 100644 index 7432cedd..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/XSS\350\204\221\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/aspnetcore-developer-roadmap.zh-Hans.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/aspnetcore-developer-roadmap.zh-Hans.png" deleted file mode 100644 index 02e2da49..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/aspnetcore-developer-roadmap.zh-Hans.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/backend.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/backend.png" deleted file mode 100644 index 15c10724..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/backend.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/devops.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/devops.png" deleted file mode 100644 index d0cc3d3f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/devops.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/frontend-v2.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/frontend-v2.png" deleted file mode 100644 index e44ca81e..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/frontend-v2.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/iOS\347\211\210\350\267\257\347\272\277\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/iOS\347\211\210\350\267\257\347\272\277\345\233\276.png" deleted file mode 100644 index 3fbc1a3c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/iOS\347\211\210\350\267\257\347\272\277\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/iOS\350\257\201\344\271\246&\346\211\223\345\214\205&\344\270\212\346\236\266.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/iOS\350\257\201\344\271\246&\346\211\223\345\214\205&\344\270\212\346\236\266.xmind" deleted file mode 100644 index 08dd2557..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/iOS\350\257\201\344\271\246&\346\211\223\345\214\205&\344\270\212\346\236\266.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/nmap\346\270\227\351\200\217\346\265\213\350\257\225\346\214\207\345\215\227.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/nmap\346\270\227\351\200\217\346\265\213\350\257\225\346\214\207\345\215\227.png" deleted file mode 100644 index 59192218..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/nmap\346\270\227\351\200\217\346\265\213\350\257\225\346\214\207\345\215\227.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/xss virus 1.0.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/xss virus 1.0.png" deleted file mode 100644 index 42fdbb7c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/xss virus 1.0.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\270\232\345\212\241\345\256\211\345\205\250top10.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\270\232\345\212\241\345\256\211\345\205\250top10.png" deleted file mode 100644 index f34287e4..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\270\232\345\212\241\345\256\211\345\205\250top10.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\273\243\347\240\201\345\256\241\350\256\241\347\232\204\346\272\242\345\207\272\350\204\221\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\273\243\347\240\201\345\256\241\350\256\241\347\232\204\346\272\242\345\207\272\350\204\221\345\233\276.png" deleted file mode 100644 index c46cc106..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\273\243\347\240\201\345\256\241\350\256\241\347\232\204\346\272\242\345\207\272\350\204\221\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\274\201\344\270\232\345\256\211\345\205\250\351\230\262\345\276\241\346\200\235\347\273\264\345\257\274\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\274\201\344\270\232\345\256\211\345\205\250\351\230\262\345\276\241\346\200\235\347\273\264\345\257\274\345\233\276.png" deleted file mode 100644 index b08a9349..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\344\274\201\344\270\232\345\256\211\345\205\250\351\230\262\345\276\241\346\200\235\347\273\264\345\257\274\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\205\245\351\227\250\344\272\214\350\277\233\345\210\266\346\274\217\346\264\236\345\210\206\346\236\220\350\204\221\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\205\245\351\227\250\344\272\214\350\277\233\345\210\266\346\274\217\346\264\236\345\210\206\346\236\220\350\204\221\345\233\276.png" deleted file mode 100644 index e45f636d..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\205\245\351\227\250\344\272\214\350\277\233\345\210\266\346\274\217\346\264\236\345\210\206\346\236\220\350\204\221\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\256\211\345\205\250\350\277\220\347\273\264\350\204\221\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\256\211\345\205\250\350\277\220\347\273\264\350\204\221\345\233\276.png" deleted file mode 100644 index 8b81abb8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\256\211\345\205\250\350\277\220\347\273\264\350\204\221\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\257\206\347\240\201\346\211\276\345\233\236\351\200\273\350\276\221\346\274\217\346\264\236.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\257\206\347\240\201\346\211\276\345\233\236\351\200\273\350\276\221\346\274\217\346\264\236.png" deleted file mode 100644 index 414f2995..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\257\206\347\240\201\346\211\276\345\233\236\351\200\273\350\276\221\346\274\217\346\264\236.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\272\224\347\224\250\345\256\235QQ,APP\344\270\213\350\275\275\345\274\225\345\257\274\346\265\201\347\250\213.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\272\224\347\224\250\345\256\235QQ,APP\344\270\213\350\275\275\345\274\225\345\257\274\346\265\201\347\250\213.xmind" deleted file mode 100644 index 69058897..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\272\224\347\224\250\345\256\235QQ,APP\344\270\213\350\275\275\345\274\225\345\257\274\346\265\201\347\250\213.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\272\224\347\224\250\345\256\235\345\276\256\344\277\241,APP\344\270\213\350\275\275\345\274\225\345\257\274\346\265\201\347\250\213.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\272\224\347\224\250\345\256\235\345\276\256\344\277\241,APP\344\270\213\350\275\275\345\274\225\345\257\274\346\265\201\347\250\213.xmind" deleted file mode 100644 index 164cf3f1..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\272\224\347\224\250\345\256\235\345\276\256\344\277\241,APP\344\270\213\350\275\275\345\274\225\345\257\274\346\265\201\347\250\213.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\274\200\346\272\220\351\241\271\347\233\256&\347\275\221\347\253\231\346\250\241\346\235\277.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\274\200\346\272\220\351\241\271\347\233\256&\347\275\221\347\253\231\346\250\241\346\235\277.xmind" deleted file mode 100644 index f9bf5f57..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\345\274\200\346\272\220\351\241\271\347\233\256&\347\275\221\347\253\231\346\250\241\346\235\277.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\203\205\346\212\245\346\224\266\351\233\206\350\204\221\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\203\205\346\212\245\346\224\266\351\233\206\350\204\221\345\233\276.png" deleted file mode 100644 index 85fa2dc9..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\203\205\346\212\245\346\224\266\351\233\206\350\204\221\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\212\200\346\234\257\346\240\210.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\212\200\346\234\257\346\240\210.xmind" deleted file mode 100644 index b835cf31..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\212\200\346\234\257\346\240\210.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\225\260\346\215\256\345\272\223\351\224\201.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\225\260\346\215\256\345\272\223\351\224\201.png" deleted file mode 100644 index ef22a564..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\225\260\346\215\256\345\272\223\351\224\201.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.xmind" deleted file mode 100644 index 56ec6a58..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\265\217\350\247\210\345\231\250\345\256\211\345\205\250\346\200\235\347\273\264\345\257\274\345\233\276.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\265\217\350\247\210\345\231\250\345\256\211\345\205\250\346\200\235\347\273\264\345\257\274\345\233\276.jpg" deleted file mode 100644 index be24000f..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\265\217\350\247\210\345\231\250\345\256\211\345\205\250\346\200\235\347\273\264\345\257\274\345\233\276.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\270\227\351\200\217\346\265\213\350\257\225.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\270\227\351\200\217\346\265\213\350\257\225.png" deleted file mode 100644 index fa895920..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\270\227\351\200\217\346\265\213\350\257\225.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\270\227\351\200\217\347\232\204\350\211\272\346\234\257.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\270\227\351\200\217\347\232\204\350\211\272\346\234\257.jpg" deleted file mode 100644 index d5ec10f2..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\346\270\227\351\200\217\347\232\204\350\211\272\346\234\257.jpg" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\347\247\273\345\212\250\345\274\200\345\217\221\350\267\257\347\272\277\345\233\276.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\347\247\273\345\212\250\345\274\200\345\217\221\350\267\257\347\272\277\345\233\276.png" deleted file mode 100644 index 65b4c266..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\347\247\273\345\212\250\345\274\200\345\217\221\350\267\257\347\272\277\345\233\276.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-Android.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-Android.xmind" deleted file mode 100644 index 86aa132b..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-Android.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-Java.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-Java.xmind" deleted file mode 100644 index 4a984279..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-Java.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-\344\270\252\344\272\272 v2.0 .xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-\344\270\252\344\272\272 v2.0 .xmind" deleted file mode 100644 index ebd52acc..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-\344\270\252\344\272\272 v2.0 .xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-\344\270\252\344\272\272.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-\344\270\252\344\272\272.xmind" deleted file mode 100644 index b976046c..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\201\214\350\203\275\345\234\260\345\233\276-\344\270\252\344\272\272.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213(\346\262\203\350\265\233).mpp" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213(\346\262\203\350\265\233).mpp" deleted file mode 100644 index 7abf1148..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213(\346\262\203\350\265\233).mpp" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213-\351\233\206\346\210\220\346\265\213\350\257\225\350\277\207\347\250\213.mpp" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213-\351\233\206\346\210\220\346\265\213\350\257\225\350\277\207\347\250\213.mpp" deleted file mode 100644 index 558672ea..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213-\351\233\206\346\210\220\346\265\213\350\257\225\350\277\207\347\250\213.mpp" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213\346\226\207\346\241\243.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213\346\226\207\346\241\243.xmind" deleted file mode 100644 index b0361103..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\344\273\266\350\277\207\347\250\213\346\226\207\346\241\243.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\350\200\203-\344\277\241\346\201\257\347\263\273\347\273\237\351\241\271\347\233\256\347\256\241\347\220\206\345\270\210.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\350\200\203-\344\277\241\346\201\257\347\263\273\347\273\237\351\241\271\347\233\256\347\256\241\347\220\206\345\270\210.xmind" deleted file mode 100644 index 4b360d0b..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\350\200\203-\344\277\241\346\201\257\347\263\273\347\273\237\351\241\271\347\233\256\347\256\241\347\220\206\345\270\210.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\350\200\203-\347\263\273\347\273\237\345\210\206\346\236\220\345\270\210.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\350\200\203-\347\263\273\347\273\237\345\210\206\346\236\220\345\270\210.xmind" deleted file mode 100644 index dfbf3154..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\275\257\350\200\203-\347\263\273\347\273\237\345\210\206\346\236\220\345\270\210.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\277\220\347\273\264\345\256\211\345\205\250.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\277\220\347\273\264\345\256\211\345\205\250.png" deleted file mode 100644 index bf936927..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\277\220\347\273\264\345\256\211\345\205\250.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\277\220\347\273\264\345\267\245\344\275\234.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\277\220\347\273\264\345\267\245\344\275\234.xmind" deleted file mode 100644 index 9f1b1fc8..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\350\277\220\347\273\264\345\267\245\344\275\234.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\351\230\277\351\207\214\344\272\221\347\233\276.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\351\230\277\351\207\214\344\272\221\347\233\276.xmind" deleted file mode 100644 index df81bebf..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\351\230\277\351\207\214\344\272\221\347\233\276.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\351\235\242\345\220\221\345\257\271\350\261\241\345\210\206\346\236\220\345\222\214\350\256\276\350\256\241.xmind" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\351\235\242\345\220\221\345\257\271\350\261\241\345\210\206\346\236\220\345\222\214\350\256\276\350\256\241.xmind" deleted file mode 100644 index 4568269e..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/99.\345\205\266\344\273\226\350\204\221\345\233\276 100 \345\274\240/\351\235\242\345\220\221\345\257\271\350\261\241\345\210\206\346\236\220\345\222\214\350\256\276\350\256\241.xmind" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/1.json" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/1.json" deleted file mode 100644 index b23e14ba..00000000 --- "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/1.json" +++ /dev/null @@ -1 +0,0 @@ -{ "applyId": "30815023", "contractNo": "10004846945", "customerId": "1024924300", "dearteType": "减免测试方案", "overduePeriodNum": 1, "DearteReason": "JM006", "jieqing": "1", "productDepart": "其他", "dearteTypeC": "减免正常", "BPMdeartePeriod": 1, "BPMrepayDate": "2020-06-23" \ No newline at end of file diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/code.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/code.png" deleted file mode 100644 index 14bab389..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/code.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/demo.png" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/demo.png" deleted file mode 100644 index c65b7f63..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/demo.png" and /dev/null differ diff --git "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/polarisxu-qrcode-m.jpg" "b/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/polarisxu-qrcode-m.jpg" deleted file mode 100644 index be466d72..00000000 Binary files "a/\350\266\205\346\270\205\346\200\235\347\273\264\345\257\274\345\233\276100\345\274\240/img/polarisxu-qrcode-m.jpg" and /dev/null differ