From 2015cf3e8594d22723d67e5d18801b71a8cb37ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B0=B8=E5=B7=9D?= <1029579233@qq.com> Date: Fri, 10 Aug 2018 16:41:20 +0800 Subject: [PATCH 1/5] Update README.md --- README.md | 66 +++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 8dbf0507..f4c2b510 100644 --- a/README.md +++ b/README.md @@ -13,151 +13,151 @@ ## 算法 :pencil2: -> [剑指 Offer 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/剑指%20offer%20题解.md) +- [剑指 Offer 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/剑指%20offer%20题解.md) 目录根据原书第二版进行编排,代码和原书有所不同,尽量比原书更简洁。 -> [Leetcode 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode%20题解.md) +- [Leetcode 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode%20题解.md) 对题目做了一个大致分类,并对每种题型的解题思路做了总结。 -> [算法](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/算法.md) +- [算法](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/算法.md) 排序、并查集、栈和队列、红黑树、散列表。 ## 操作系统 :computer: -> [计算机操作系统](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机操作系统.md) +- [计算机操作系统](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机操作系统.md) 进程管理、内存管理、设备管理、链接。 -> [Linux](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Linux.md) +- [Linux](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Linux.md) 基本实现原理以及基本操作。 ## 网络 :cloud: -> [计算机网络](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机网络.md) +- [计算机网络](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机网络.md) 物理层、链路层、网络层、运输层、应用层。 -> [HTTP](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/HTTP.md) +- [HTTP](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/HTTP.md) 方法、状态码、Cookie、缓存、连接管理、HTTPs、HTTP 2.0。 -> [Socket](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Socket.md) +- [Socket](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Socket.md) I/O 模型、I/O 多路复用。 ## 面向对象 :couple: -> [设计模式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/设计模式.md) +- [设计模式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/设计模式.md) 实现了 Gof 的 23 种设计模式。 -> [面向对象思想](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/面向对象思想.md) +- [面向对象思想](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/面向对象思想.md) 三大原则(继承、封装、多态)、类图、设计原则。 ## 数据库 :floppy_disk: -> [数据库系统原理](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/数据库系统原理.md) +- [数据库系统原理](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/数据库系统原理.md) 事务、锁、隔离级别、MVCC、间隙锁、范式。 -> [SQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/SQL.md) +- [SQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/SQL.md) SQL 基本语法。 -> [Leetcode-Database 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode-Database%20题解.md) +- [Leetcode-Database 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode-Database%20题解.md) Leetcode 上数据库题目的解题记录。 -> [MySQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/MySQL.md) +- [MySQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/MySQL.md) 存储引擎、索引、查询优化、切分、复制。 -> [Redis](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Redis.md) +- [Redis](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Redis.md) 五种数据类型、字典和跳跃表数据结构、使用场景、和 Memcache 的比较、淘汰策略、持久化、文件事件的 Reactor 模式、复制。 ## Java :coffee: -> [Java 基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20基础.md) +- [Java 基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20基础.md) 不会涉及很多基本语法介绍,主要是一些实现原理以及关键特性。 -> [Java 容器](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20容器.md) +- [Java 容器](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20容器.md) 源码分析:ArrayList、Vector、CopyOnWriteArrayList、LinkedList、HashMap、ConcurrentHashMap、LinkedHashMap、WeekHashMap。 -> [Java 并发](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20并发.md) +- [Java 并发](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20并发.md) 线程使用方式、两种互斥同步方法、线程协作、JUC、线程安全、内存模型、锁优化。 -> [Java 虚拟机](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20虚拟机.md) +- [Java 虚拟机](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20虚拟机.md) 运行时数据区域、垃圾收集、类加载。 -> [Java I/O](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20IO.md) +- [Java I/O](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20IO.md) NIO 的原理以及实例。 ## 系统设计 :bulb: -> [系统设计基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/系统设计基础.md) +- [系统设计基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/系统设计基础.md) 性能、伸缩性、扩展性、可用性、安全性 -> [分布式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/分布式.md) +- [分布式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/分布式.md) 分布式锁、分布式事务、CAP、BASE、Paxos、Raft -> [集群](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/集群.md) +- [集群](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/集群.md) 负载均衡、Session 管理 -> [攻击技术](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/攻击技术.md) +- [攻击技术](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/攻击技术.md) XSS、CSRF、SQL 注入、DDoS -> [缓存](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/缓存.md) +- [缓存](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/缓存.md) 缓存特征、缓存位置、缓存问题、数据分布、一致性哈希、LRU、CDN -> [消息队列](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/消息队列.md) +- [消息队列](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/消息队列.md) 消息处理模型、使用场景、可靠性 ## 工具 :hammer: -> [Git](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Git.md) +- [Git](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Git.md) 一些 Git 的使用和概念。 -> [Docker](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Docker.md) +- [Docker](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Docker.md) Docker 基本原理。 -> [正则表达式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/正则表达式.md) +- [正则表达式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/正则表达式.md) 正则表达式基本语法。 -> [构建工具](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/构建工具.md) +- [构建工具](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/构建工具.md) 构建工具的基本概念、主流构建工具介绍。 ## 编码实践 :speak_no_evil: -> [重构](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/重构.md) +- [重构](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/重构.md) 参考 重构 改善既有代码的设计。 -> [代码可读性](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码可读性.md) +- [代码可读性](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码可读性.md) 参考 编写可读代码的艺术。 -> [代码风格规范](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码风格规范.md) +- [代码风格规范](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码风格规范.md) Google 开源项目的代码风格规范。 From 8afe65df0c84979c576949f5e836a507ff7091d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B0=B8=E5=B7=9D?= <1029579233@qq.com> Date: Fri, 10 Aug 2018 16:42:23 +0800 Subject: [PATCH 2/5] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f4c2b510..728fb40c 100644 --- a/README.md +++ b/README.md @@ -15,25 +15,25 @@ - [剑指 Offer 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/剑指%20offer%20题解.md) -目录根据原书第二版进行编排,代码和原书有所不同,尽量比原书更简洁。 + 目录根据原书第二版进行编排,代码和原书有所不同,尽量比原书更简洁。 - [Leetcode 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode%20题解.md) -对题目做了一个大致分类,并对每种题型的解题思路做了总结。 + 对题目做了一个大致分类,并对每种题型的解题思路做了总结。 - [算法](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/算法.md) -排序、并查集、栈和队列、红黑树、散列表。 + 排序、并查集、栈和队列、红黑树、散列表。 ## 操作系统 :computer: - [计算机操作系统](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机操作系统.md) -进程管理、内存管理、设备管理、链接。 + 进程管理、内存管理、设备管理、链接。 - [Linux](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Linux.md) -基本实现原理以及基本操作。 + 基本实现原理以及基本操作。 ## 网络 :cloud: From d2bafee9a193e05782c33d9ae88a253971ccb6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B0=B8=E5=B7=9D?= <1029579233@qq.com> Date: Fri, 10 Aug 2018 16:43:23 +0800 Subject: [PATCH 3/5] Update README.md --- README.md | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 728fb40c..4de16ff4 100644 --- a/README.md +++ b/README.md @@ -39,127 +39,127 @@ - [计算机网络](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机网络.md) -物理层、链路层、网络层、运输层、应用层。 + 物理层、链路层、网络层、运输层、应用层。 - [HTTP](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/HTTP.md) -方法、状态码、Cookie、缓存、连接管理、HTTPs、HTTP 2.0。 + 方法、状态码、Cookie、缓存、连接管理、HTTPs、HTTP 2.0。 - [Socket](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Socket.md) -I/O 模型、I/O 多路复用。 + I/O 模型、I/O 多路复用。 ## 面向对象 :couple: - [设计模式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/设计模式.md) -实现了 Gof 的 23 种设计模式。 + 实现了 Gof 的 23 种设计模式。 - [面向对象思想](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/面向对象思想.md) -三大原则(继承、封装、多态)、类图、设计原则。 + 三大原则(继承、封装、多态)、类图、设计原则。 ## 数据库 :floppy_disk: - [数据库系统原理](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/数据库系统原理.md) -事务、锁、隔离级别、MVCC、间隙锁、范式。 + 事务、锁、隔离级别、MVCC、间隙锁、范式。 - [SQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/SQL.md) -SQL 基本语法。 + SQL 基本语法。 - [Leetcode-Database 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode-Database%20题解.md) -Leetcode 上数据库题目的解题记录。 + Leetcode 上数据库题目的解题记录。 - [MySQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/MySQL.md) -存储引擎、索引、查询优化、切分、复制。 + 存储引擎、索引、查询优化、切分、复制。 - [Redis](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Redis.md) -五种数据类型、字典和跳跃表数据结构、使用场景、和 Memcache 的比较、淘汰策略、持久化、文件事件的 Reactor 模式、复制。 + 五种数据类型、字典和跳跃表数据结构、使用场景、和 Memcache 的比较、淘汰策略、持久化、文件事件的 Reactor 模式、复制。 ## Java :coffee: - [Java 基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20基础.md) -不会涉及很多基本语法介绍,主要是一些实现原理以及关键特性。 + 不会涉及很多基本语法介绍,主要是一些实现原理以及关键特性。 - [Java 容器](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20容器.md) -源码分析:ArrayList、Vector、CopyOnWriteArrayList、LinkedList、HashMap、ConcurrentHashMap、LinkedHashMap、WeekHashMap。 + 源码分析:ArrayList、Vector、CopyOnWriteArrayList、LinkedList、HashMap、ConcurrentHashMap、LinkedHashMap、WeekHashMap。 - [Java 并发](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20并发.md) -线程使用方式、两种互斥同步方法、线程协作、JUC、线程安全、内存模型、锁优化。 + 线程使用方式、两种互斥同步方法、线程协作、JUC、线程安全、内存模型、锁优化。 - [Java 虚拟机](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20虚拟机.md) -运行时数据区域、垃圾收集、类加载。 + 运行时数据区域、垃圾收集、类加载。 - [Java I/O](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20IO.md) -NIO 的原理以及实例。 + NIO 的原理以及实例。 ## 系统设计 :bulb: - [系统设计基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/系统设计基础.md) -性能、伸缩性、扩展性、可用性、安全性 + 性能、伸缩性、扩展性、可用性、安全性 - [分布式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/分布式.md) -分布式锁、分布式事务、CAP、BASE、Paxos、Raft + 分布式锁、分布式事务、CAP、BASE、Paxos、Raft - [集群](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/集群.md) -负载均衡、Session 管理 + 负载均衡、Session 管理 - [攻击技术](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/攻击技术.md) -XSS、CSRF、SQL 注入、DDoS + XSS、CSRF、SQL 注入、DDoS - [缓存](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/缓存.md) -缓存特征、缓存位置、缓存问题、数据分布、一致性哈希、LRU、CDN + 缓存特征、缓存位置、缓存问题、数据分布、一致性哈希、LRU、CDN - [消息队列](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/消息队列.md) -消息处理模型、使用场景、可靠性 + 消息处理模型、使用场景、可靠性 ## 工具 :hammer: - [Git](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Git.md) -一些 Git 的使用和概念。 + 一些 Git 的使用和概念。 - [Docker](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Docker.md) -Docker 基本原理。 + Docker 基本原理。 - [正则表达式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/正则表达式.md) -正则表达式基本语法。 + 正则表达式基本语法。 - [构建工具](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/构建工具.md) -构建工具的基本概念、主流构建工具介绍。 + 构建工具的基本概念、主流构建工具介绍。 ## 编码实践 :speak_no_evil: - [重构](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/重构.md) -参考 重构 改善既有代码的设计。 + 参考 重构 改善既有代码的设计。 - [代码可读性](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码可读性.md) -参考 编写可读代码的艺术。 + 参考 编写可读代码的艺术。 - [代码风格规范](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码风格规范.md) -Google 开源项目的代码风格规范。 + Google 开源项目的代码风格规范。 ## 后记 :memo: From 305623c80f114d3bc4d04689902b9428d4c8a705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B0=B8=E5=B7=9D?= <1029579233@qq.com> Date: Fri, 10 Aug 2018 16:49:08 +0800 Subject: [PATCH 4/5] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4de16ff4..42788e54 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

- +
@@ -163,7 +163,7 @@ ## 后记 :memo: -**About** +### About 这个仓库是笔者的一个学习笔记,主要总结一些比较重要的知识点,希望对大家有所帮助。 @@ -171,7 +171,7 @@ [BOOKLIST](https://github.com/CyC2018/Interview-Notebook/blob/master/BOOKLIST.md),这个书单是笔者至今看的一些比较好的技术书籍,虽然没有全都看完,但每本书多多少少都看了一部分。 -**How To Contribute** +### How To Contribute 笔记内容是笔者一个字一个字打上去的,难免会有一些笔误,如果发现笔误可直接在相应文档进行编辑修改。 @@ -179,13 +179,13 @@ 欢迎在 Issue 中提交对本仓库的改进建议~ -**Authorization** +### Authorization 虽然没有加开源协议,但是允许非商业性使用。 转载使用请注明出处,谢谢! -**Typesetting** +### Typesetting 笔记内容按照 [中文文案排版指北](http://mazhuang.org/wiki/chinese-copywriting-guidelines/) 进行排版,以保证内容的可读性。 @@ -193,7 +193,7 @@ 笔者将自己实现的文档排版功能提取出来,放在 Github Page 中,无需下载安装即可免费使用:[Text-Typesetting](https://github.com/CyC2018/Markdown-Typesetting)。 -**Uploading** +### Uploading 笔者在本地使用为知笔记软件进行书写,为了方便将本地笔记内容上传到 Github 上,实现了一整套自动化上传方案,包括文本文件的导出、提取图片、Markdown 文档转换、Git 同步。 @@ -201,15 +201,15 @@ 笔者将自己实现文档转换功能提取出来,方便大家在需要将本地 Markdown 上传到 Github,或者制作项目 README 文档时生成目录时使用:[GFM-Converter](https://github.com/CyC2018/GFM-Converter)。 -**Statement** +### Statement 本仓库不参与商业行为,不向读者收取任何费用。(This repository is not engaging in business activities, and does not charge readers any fee.) -**Logo** +### Logo Power by [logomakr](https://logomakr.com/). -**Acknowledgements** +### Acknowledgements 感谢以下人员对本仓库做出的贡献,当然不仅仅只有这些贡献者,这里就不一一列举了。如果你希望被添加到这个名单中,并且提交过 Issue 或者 PR,请与笔者联系。 From b6156c4247f05d29a65564f0e337545fde70fea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B0=B8=E5=B7=9D?= <1029579233@qq.com> Date: Fri, 10 Aug 2018 18:33:36 +0800 Subject: [PATCH 5/5] =?UTF-8?q?Update=20Leetcode=20=E9=A2=98=E8=A7=A3.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/Leetcode 题解.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notes/Leetcode 题解.md b/notes/Leetcode 题解.md index 102fe9b6..d8e53838 100644 --- a/notes/Leetcode 题解.md +++ b/notes/Leetcode 题解.md @@ -57,9 +57,9 @@ ## 贪心思想 -贪心思想保证每次操作都是局部最优的,并且最后得到的结果是全局最优的。 +保证每次操作都是局部最优的,并且最后得到的结果是全局最优的。 -**分配饼干** +**分配饼干** [455. Assign Cookies (Easy)](https://leetcode.com/problems/assign-cookies/description/) @@ -74,7 +74,7 @@ You need to output 2. 题目描述:每个孩子都有一个满足度,每个饼干都有一个大小,只有饼干的大小大于等于一个孩子的满足度,该孩子才会获得满足。求解最多可以获得满足的孩子数量。 -因为最小的孩子最容易得到满足,因此先满足最小孩子。给一个孩子的饼干应当尽量小又能满足该孩子,这样大饼干就能拿来给满足度比较大的孩子。因此贪心策略 +给一个孩子的饼干应当尽量小又能满足该孩子,这样大饼干就能拿来给满足度比较大的孩子。因为最小的孩子最容易得到满足,所以先满足最小的孩子。 证明:假设在某次选择中,贪心策略选择给当前满足度最小的孩子分配第 m 个饼干,第 m 个饼干为可以满足该孩子的最小饼干。假设存在一种最优策略,给该孩子分配第 n 个饼干,并且 m < n。我们可以发现,经过这一轮分配,贪心策略分配后剩下的饼干一定有一个比最优策略来得大。因此在后续的分配中,贪心策略一定能满足更多的孩子。也就是说不存在比贪心策略更优的策略,即贪心策略就是最优策略。