Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CyC2018 committed Oct 31, 2019
1 parent 0cb51ec commit a8c5bb7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/notes/Leetcode 题解 - 贪心思想.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Output: 2

证明假设在某次选择中贪心策略选择给当前满足度最小的孩子分配第 m 个饼干 m 个饼干为可以满足该孩子的最小饼干假设存在一种最优策略可以给该孩子分配第 n 个饼干并且 m < n我们可以发现经过这一轮分配贪心策略分配后剩下的饼干一定有一个比最优策略来得大因此在后续的分配中贪心策略一定能满足更多的孩子也就是说不存在比贪心策略更优的策略即贪心策略就是最优策略

<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/6fb7cf89-71b3-48c1-bc6a-5110e1f1fc15.gif" width="600px"> </div><br>
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/e69537d2-a016-4676-b169-9ea17eeb9037.gif" width="430px"> </div><br>

```java
public int findContentChildren(int[] grid, int[] size) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion notes/Leetcode 题解 - 贪心思想.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Output: 2

证明假设在某次选择中贪心策略选择给当前满足度最小的孩子分配第 m 个饼干 m 个饼干为可以满足该孩子的最小饼干假设存在一种最优策略可以给该孩子分配第 n 个饼干并且 m < n我们可以发现经过这一轮分配贪心策略分配后剩下的饼干一定有一个比最优策略来得大因此在后续的分配中贪心策略一定能满足更多的孩子也就是说不存在比贪心策略更优的策略即贪心策略就是最优策略

<div align="center"> <img src="pics/6fb7cf89-71b3-48c1-bc6a-5110e1f1fc15.gif" width="600px"> </div><br>
<div align="center"> <img src="pics/e69537d2-a016-4676-b169-9ea17eeb9037.gif" width="430px"> </div><br>

```java
public int findContentChildren(int[] grid, int[] size) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a8c5bb7

Please sign in to comment.