Fix code naming style.

This commit is contained in:
krahets
2023-10-15 21:18:09 +08:00
parent ada37fd1f8
commit 346c8451de
23 changed files with 51 additions and 51 deletions
@@ -8,18 +8,18 @@ namespace hello_algo.chapter_dynamic_programming;
public class climbing_stairs_dfs {
/* 搜索 */
public int Dfs(int i) {
public int DFS(int i) {
// 已知 dp[1] 和 dp[2] ,返回之
if (i == 1 || i == 2)
return i;
// dp[i] = dp[i-1] + dp[i-2]
int count = Dfs(i - 1) + Dfs(i - 2);
int count = DFS(i - 1) + DFS(i - 2);
return count;
}
/* 爬楼梯:搜索 */
public int ClimbingStairsDFS(int n) {
return Dfs(n);
return DFS(n);
}
[Test]