Skip to content

Commit e13b84c

Browse files
author
Yi Gu
committed
Update README and fix space complexity of Frog Jump
1 parent 236f46c commit e13b84c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

DP/FrogJump.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Question Link: https://leetcode.com/problems/frog-jump/
33
* Primary idea: Dynamic Programming, a dictionary to keep all steps that the position
44
* can jump, and a dp array to keep max step that the position can take
5-
* Time Complexity: O(n^2), Space Complexity: O(1)
5+
* Time Complexity: O(n^2), Space Complexity: O(n)
66
*
77
*/
88

@@ -44,4 +44,4 @@ class FrogJump {
4444
dict[index] = set
4545
}
4646
}
47-
}
47+
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* [Microsoft](#microsoft)
2828

2929
## Progress
30-
[Problem Status](#problem-status) shows the latest progress to all 400+ questions. Currently we have 206 completed solutions. Note: questions with ♥ mark means that you have to **Subscript to premium membership** of LeetCode to unlock them. Thank you for great contributions from [CharleneJiang](https://github.com/CharleneJiang), [ReadmeCritic](https://github.com/ReadmeCritic), [demonkoo](https://github.com/demonkoo), [DaiYue](https://github.com/DaiYue), [Quaggie](https://github.com/Quaggie) and [jindulys](https://github.com/jindulys).
30+
[Problem Status](#problem-status) shows the latest progress to all 400+ questions. Currently we have 207 completed solutions. Note: questions with ♥ mark means that you have to **Subscript to premium membership** of LeetCode to unlock them. Thank you for great contributions from [CharleneJiang](https://github.com/CharleneJiang), [ReadmeCritic](https://github.com/ReadmeCritic), [demonkoo](https://github.com/demonkoo), [DaiYue](https://github.com/DaiYue), [Quaggie](https://github.com/Quaggie) and [jindulys](https://github.com/jindulys).
3131

3232

3333
## Array
@@ -176,6 +176,7 @@
176176
[Triangle](https://leetcode.com/problems/triangle/)| [Swift](./DP/Triangle.swift)| Medium| O(2^n - 1)| O(m)|
177177
[Guess Number Higher or Lower II](https://leetcode.com/problems/guess-number-higher-or-lower-ii/)| [Swift](./DP/GuessNumberHigherOrLowerII.swift)| Medium| O(nlogn)| O(n^2)|
178178
[Burst Ballons](https://leetcode.com/problems/burst-balloons/)| [Swift](./DP/BurstBalloons.swift)| Hard| O(n^3)| O(n)|
179+
[Frog Jump](https://leetcode.com/problems/frog-jump/)| [Swift](./DP/FrogJump.swift)| Hard| O(n^2)| O(n)|
179180

180181
## Depth-first search
181182
| Title | Solution | Difficulty | Time | Space |

0 commit comments

Comments
 (0)