Skip to content

Commit 8e54fcf

Browse files
committed
update
1 parent a296dc2 commit 8e54fcf

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Python/jumpGameII.py Python/jump-game-ii.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Time: O(n * n)
1+
# Time: O(n^2)
22
# Space: O(1)
33
#
44
# Given an array of non-negative integers, you are initially positioned at the first index of the array.
@@ -29,4 +29,4 @@ def jump(self, A):
2929

3030
if __name__ == "__main__":
3131
print Solution().jump([2,3,1,1,4])
32-
print Solution().jump([3,2,1,0,4])
32+
print Solution().jump([3,2,1,0,4])
File renamed without changes.

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ Problem | Solution | Time | Space | Difficul
294294
[Candy]| [candy.py] | _O(n)_ | _O(n)_ | Hard |
295295
[Container With Most Water]| [container-with-most-water.py] | _O(n)_ | _O(1)_ | Medium |
296296
[Gas Station]| [gas-station.py] | _O(n)_ | _O(1)_ | Medium |
297+
[Jump Game] | [jump-game.py] | _O(n)_ | _O(1)_ | Medium |
298+
[Jump Game II] | [jump-game-ii.py] | _O(n^2)_ | _O(1)_ | Hard |
297299

298300
[Best Time to Buy and Sell Stock II]:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
299301
[best-time-to-buy-and-sell-stock-ii.py]:https://github.com/kamyu104/LeetCode/blob/master/Python/best-time-to-buy-and-sell-stock-ii.py
@@ -303,3 +305,7 @@ Problem | Solution | Time | Space | Difficul
303305
[container-with-most-water.py]:https://github.com/kamyu104/LeetCode/blob/master/Python/container-with-most-water.py
304306
[Gas Station]:https://oj.leetcode.com/problems/gas-station/
305307
[gas-station.py]:https://github.com/kamyu104/LeetCode/blob/master/Python/gas-station.py
308+
[Jump Game]:https://oj.leetcode.com/problems/jump-game/
309+
[jump-game.py]:https://github.com/kamyu104/LeetCode/blob/master/Python/jump-game.py
310+
[Jump Game II]:https://oj.leetcode.com/problems/jump-game-ii/
311+
[jump-game-ii.py]:https://github.com/kamyu104/LeetCode/blob/master/Python/jump-game-ii.py

0 commit comments

Comments
 (0)