mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-03 19:52:01 +08:00
Retranslate the complete Japanese online edition from Chinese (#2008)
* Retranslate the complete Japanese online edition from Chinese * Fit Japanese homepage labels and localize heading permalinks * Point Japanese contribution instructions to the Japanese preview * Replace locale conditionals with multilingual UI tables
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
package chapter_dynamic_programming;
|
||||
|
||||
public class climbing_stairs_dfs {
|
||||
/* 検索 */
|
||||
/* 探索 */
|
||||
public static int dfs(int i) {
|
||||
// dp[1] と dp[2] は既知なので返す
|
||||
// dp[1] と dp[2] は既知なので、その値を返す
|
||||
if (i == 1 || i == 2)
|
||||
return i;
|
||||
// dp[i] = dp[i-1] + dp[i-2]
|
||||
@@ -17,7 +17,7 @@ public class climbing_stairs_dfs {
|
||||
return count;
|
||||
}
|
||||
|
||||
/* 階段登り:探索 */
|
||||
/* 階段の上り方:探索 */
|
||||
public static int climbingStairsDFS(int n) {
|
||||
return dfs(n);
|
||||
}
|
||||
@@ -26,6 +26,6 @@ public class climbing_stairs_dfs {
|
||||
int n = 9;
|
||||
|
||||
int res = climbingStairsDFS(n);
|
||||
System.out.println(String.format("%d 段の階段の登り方は全部で %d 通り", n, res));
|
||||
System.out.println(String.format("%d 段の階段を上る方法は全部で %d 通り", n, res));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user