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 ec1a55a commit ea9b1fdCopy full SHA for ea9b1fd
โjump-game/KwonNayeon.pyโ
@@ -3,13 +3,15 @@
3
- 1 <= nums.length <= 10^4
4
- 0 <= nums[i] <= 10^5
5
6
+<Solution 1>
7
+
8
Time Complexity: O(n)
9
- n์ ๋ฐฐ์ด์ ๊ธธ์ด๋งํผ ํ ๋ฒ ์ํ
10
11
Space Complexity: O(1)
12
- ์ถ๊ฐ ๊ณต๊ฐ ์ฌ์ฉ ์์
13
-ํ์ด๋ฐฉ๋ฒ:
14
+ํ์ด๋ฐฉ๋ฒ:
15
1. max_reach ๋ณ์๋ก ํ์ฌ๊น์ง ๋๋ฌ ๊ฐ๋ฅํ ์ต๋ ๊ฑฐ๋ฆฌ ์ ์ฅ
16
2. ๋ฐฐ์ด์ ์ํํ๋ฉด์:
17
- ํ์ฌ ์์น๊ฐ max_reach๋ณด๋ค ํฌ๋ฉด ๋๋ฌ ๋ถ๊ฐ๋ฅ
@@ -30,3 +32,16 @@ def canJump(self, nums: List[int]) -> bool:
30
32
return True
31
33
34
35
36
+"""
37
+<Solution 2>
38
39
+Time Complexity:
40
+-
41
42
+Space Complexity:
43
44
45
46
47
0 commit comments