From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/jump_game.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 other/jump_game.cpp (limited to 'other/jump_game.cpp') diff --git a/other/jump_game.cpp b/other/jump_game.cpp deleted file mode 100644 index 153d9aa..0000000 --- a/other/jump_game.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - bool canJump(vector &nums) { - int minJump = 0; - for (int i = nums.size() - 2; i >= 0; i--) { - minJump++; - if (nums[i] >= minJump) - minJump = 0; - } - if (minJump == 0) - return true; - else - return false; - } -}; - -int main() { - Solution obj; - vector nums1 = {2, 3, 1, 1, 4}, nums2 = {3, 2, 1, 0, 4}; - testBool(obj.canJump(nums1)); // true - testBool(obj.canJump(nums2)); // false -} -- cgit v1.2.3