File tree 5 files changed +29
-4
lines changed
2018/05/26/Dynamic-Programming
5 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 88
88
< meta property ="og:description " content ="动态规划这篇文章详细记录LeetCode上各种难度的动态规划题目。每道题我都给出题目,思路以及Python代码。 ">
89
89
< meta property ="og:locale " content ="default ">
90
90
< meta property ="og:image " content ="http://yoursite.com/2018/05/26/Dynamic-Programming/knight.png ">
91
- < meta property ="og:updated_time " content ="2018-05-29T03:55:50.151Z ">
91
+ < meta property ="og:updated_time " content ="2018-05-29T04:03:35.655Z ">
92
92
< meta name ="twitter:card " content ="summary ">
93
93
< meta name ="twitter:title " content ="Dynamic Programming ">
94
94
< meta name ="twitter:description " content ="动态规划这篇文章详细记录LeetCode上各种难度的动态规划题目。每道题我都给出题目,思路以及Python代码。 ">
@@ -420,7 +420,10 @@ <h3 id="746-Min-Cost-Climbing-Stairs"><a href="#746-Min-Cost-Climbing-Stairs" cl
420
420
< p > 典型动态规划,且只需要一维dp数组维护,考虑到可以从index=0|1开始,所以在dp数组前面插入两个0(因为是加法,乘法则插入1),同时要表示终点,则在dp尾再插入一个0,统计到达top时的cost。</ p >
421
421
</ li >
422
422
< li > < p > 代码</ p >
423
- < figure class ="highlight python "> < table > < tr > < td class ="gutter "> < pre > < div class ="line "> 1</ div >
423
+ < div > < div class ="fold_hider "> < div class ="close hider_title "> click</ div > </ div > < div class ="fold ">
424
+ < p > ></ p >
425
+ < blockquote >
426
+ < figure class ="highlight python "> < table > < tr > < td class ="gutter "> < pre > < div class ="line "> 1</ div >
424
427
< div class ="line "> 2</ div >
425
428
< div class ="line "> 3</ div >
426
429
< div class ="line "> 4</ div >
@@ -445,6 +448,9 @@ <h3 id="746-Min-Cost-Climbing-Stairs"><a href="#746-Min-Cost-Climbing-Stairs" cl
445
448
< div class ="line "> > < span class ="keyword "> return</ span > dp[< span class ="number "> -1</ span > ]</ div >
446
449
< div class ="line "> ></ div >
447
450
</ pre > </ td > </ tr > </ table > </ figure >
451
+ </ blockquote >
452
+
453
+ </ div > </ div >
448
454
</ li >
449
455
</ ul >
450
456
</ blockquote >
Original file line number Diff line number Diff line change
1
+ .hider_title {
2
+ font-family : "Microsoft Yahei" ;
3
+ cursor : pointer;
4
+ }
5
+ .close : after {
6
+ content : "▼" ;
7
+ }
8
+ .open : after {
9
+ content : "▲" ;
10
+ }
Original file line number Diff line number Diff line change @@ -1822,7 +1822,7 @@ pre .javascript .function {
1822
1822
width : 4px ;
1823
1823
height : 4px ;
1824
1824
border-radius : 50% ;
1825
- background : # 71c46c ;
1825
+ background : # 3b5da1 ;
1826
1826
}
1827
1827
.links-of-blogroll {
1828
1828
font-size : 13px ;
Original file line number Diff line number Diff line change @@ -97,3 +97,12 @@ $(document).ready(function () {
97
97
} ) : NexT . utils . displaySidebar ( ) ;
98
98
}
99
99
} ) ;
100
+
101
+ $ ( document ) . ready ( function ( ) {
102
+ $ ( document ) . on ( 'click' , '.fold_hider' , function ( ) {
103
+ $ ( '>.fold' , this . parentNode ) . slideToggle ( ) ;
104
+ $ ( '>:first' , this ) . toggleClass ( 'open' ) ;
105
+ } ) ;
106
+ //默认情况下折叠
107
+ $ ( "div.fold" ) . css ( "display" , "none" ) ;
108
+ } ) ;
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments