We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e101f27 commit b366ad7Copy full SHA for b366ad7
climbing-stairs/paragon0107_230.java
@@ -1,3 +1,11 @@
1
+/*
2
+*
3
+* 시간 복잡도:
4
+* 바텀업 형식으로 배열을 훑으며 올라가기 때문에 O(N)
5
+* 공간 복잡도:
6
+* 자연수 마다 해당하는 방법의 갯수를 저장하기 때문에 O(N)
7
8
+* */
9
class Solution {
10
public int climbStairs(int n) {
11
int[] dp = new int[n + 1];
0 commit comments