mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-01 03:24:24 +08:00 
			
		
		
		
	fix: correct String.format() parameter passing error in climbing_stairs_*.java (#1807)
This commit is contained in:
		| @ -39,6 +39,6 @@ public class climbing_stairs_backtrack { | ||||
|         int n = 9; | ||||
|  | ||||
|         int res = climbingStairsBacktrack(n); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", n, res)); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", res, n)); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -31,6 +31,6 @@ public class climbing_stairs_constraint_dp { | ||||
|         int n = 9; | ||||
|  | ||||
|         int res = climbingStairsConstraintDP(n); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", n, res)); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", res, n)); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -26,6 +26,6 @@ public class climbing_stairs_dfs { | ||||
|         int n = 9; | ||||
|  | ||||
|         int res = climbingStairsDFS(n); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", n, res)); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", res, n)); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -36,6 +36,6 @@ public class climbing_stairs_dfs_mem { | ||||
|         int n = 9; | ||||
|  | ||||
|         int res = climbingStairsDFSMem(n); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", n, res)); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", res, n)); | ||||
|     } | ||||
| } | ||||
| } | ||||
|  | ||||
| @ -40,9 +40,9 @@ public class climbing_stairs_dp { | ||||
|         int n = 9; | ||||
|  | ||||
|         int res = climbingStairsDP(n); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", n, res)); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", res, n)); | ||||
|  | ||||
|         res = climbingStairsDPComp(n); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", n, res)); | ||||
|         System.out.println(String.format("There are %d solutions to climb %d stairs", res, n)); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 PXG-XPG
					PXG-XPG