File tree 3 files changed +2
-4
lines changed
3 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 25
25
- [ 程序员面试金典(第 6 版)] ( ./lcci/README.md )
26
26
27
27
## 参与项目
28
+ 刷编程题的最大好处就是** 可以锻炼解决问题的思维能力** 。相信我,「如何去思考」本身也是一项需要不断学习和练习的技能。非常感谢前微软工程师、现蚂蚁金服技术专家 [ @kfstorm ] ( https://github.com/kfstorm ) 贡献了本项目的所有 [ C# 题解] ( https://github.com/doocs/leetcode/pull/245 ) 。
29
+
28
30
如果你对本项目感兴趣,并且希望加入我们刷题大军,欢迎随时提交 [ PR] ( https://github.com/doocs/leetcode/pulls ) 。请参考如下步骤:
29
31
30
32
- 将[ 本项目] ( https://github.com/doocs/leetcode ) <kbd >Fork</kbd > 到你的个人 GitHub 帐户,然后 <kbd >clone</kbd > 到你的本地机器;
Original file line number Diff line number Diff line change 27
27
class Solution :
28
28
def maxValue (self , grid : List[List[int ]]) -> int :
29
29
rows, cols = len (grid), len (grid[0 ])
30
- if rows == 0 or cols == 0 :
31
- return 0
32
30
vals = [[0 for _ in range (cols)] for _ in range (rows)]
33
31
vals[0 ][0 ] = grid[0 ][0 ]
34
32
for i in range (1 , rows):
Original file line number Diff line number Diff line change 1
1
class Solution :
2
2
def maxValue (self , grid : List [List [int ]]) -> int :
3
3
rows , cols = len (grid ), len (grid [0 ])
4
- if rows == 0 or cols == 0 :
5
- return 0
6
4
vals = [[0 for _ in range (cols )] for _ in range (rows )]
7
5
vals [0 ][0 ] = grid [0 ][0 ]
8
6
for i in range (1 , rows ):
You can’t perform that action at this time.
0 commit comments