Skip to content

Commit ad0f945

Browse files
committed
Update 01.Greedy-Algorithm.md
1 parent 922939d commit ad0f945

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Contents/09.Algorithm-Base/05.Greedy-Algorithm/01.Greedy-Algorithm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
换句话说,当进行选择时,我们直接做出在当前问题中看来最优的选择,而不用去考虑子问题的解。在做出选择之后,才会去求解剩下的子问题,如下图所示。
2525

26-
![](https://qcdn.itcharge.cn/images/20220511174939.png)
26+
![贪心选择性质](https://qcdn.itcharge.cn/images/20240513163300.png)
2727

2828
贪心算法在进行选择时,可能会依赖之前做出的选择,但不会依赖任何将来的选择或是子问题的解。运用贪心算法解决的问题在程序的运行过程中无回溯过程。
2929

@@ -37,7 +37,7 @@
3737

3838
也就是说,如果原问题的最优解包含子问题的最优解,则说明该问题满足最优子结构性质。
3939

40-
![](https://qcdn.itcharge.cn/images/20220511175042.png)
40+
![最优子结构性质](https://qcdn.itcharge.cn/images/20240513163310.png)
4141

4242
在做了贪心选择后,满足最优子结构性质的原问题可以分解成规模更小的类似子问题来解决,并且可以通过贪心选择和子问题的最优解推导出问题的最优解。
4343

0 commit comments

Comments
 (0)