diff options
author | Jack Sangdahl <[email protected]> | 2025-02-03 15:37:19 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2025-02-03 15:37:19 -0700 |
commit | 55a67f776dd9acd258cae16ffb636751666b0f40 (patch) | |
tree | 601539de43809b70ceb8228a12c35883fa300b03 /jump_game2.cpp | |
parent | a0030873dabb517594ae0394350d6715071f7fb8 (diff) | |
download | leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.tar.gz leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.zip |
chore: Remove incomplete solutions
Diffstat (limited to 'jump_game2.cpp')
-rw-r--r-- | jump_game2.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/jump_game2.cpp b/jump_game2.cpp deleted file mode 100644 index 23d2b35..0000000 --- a/jump_game2.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int jump(vector<int> &nums) { - int n = nums.size(); - vector<int> dp(n, 10001); - dp[n - 1] = 0; - for (int i = n - 2; i >= 0; i--) - for (int jumpLen = 1; jumpLen <= nums[i]; jumpLen++) - dp[i] = min(dp[i], 1 + dp[min(n - 1, i + jumpLen)]); - return dp[0]; - } -}; - -int main() {} |