From 78706a7a17f2088f33aa61995daf1724f45c674a Mon Sep 17 00:00:00 2001 From: s50600822 Date: Mon, 30 Oct 2023 06:31:30 +1100 Subject: [PATCH] clean --- .../java/src/main/java/hoa/can/code/gg/Jumping.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/Jumping.java b/interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/Jumping.java index 5dccb74f..be57d77e 100644 --- a/interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/Jumping.java +++ b/interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/Jumping.java @@ -3,10 +3,10 @@ import java.util.Arrays; /** - * https://leetcode.com/problems/jump-game/ + * Desc */ public class Jumping { - final static int NO_WAY = Integer.MAX_VALUE - 1; + final static int NO_WAY = 10000; public static boolean canJump(int[] nums) { int[] memo = new int[nums.length]; @@ -16,7 +16,7 @@ public static boolean canJump(int[] nums) { return (step != NO_WAY); } - private static int minJumps(int steps[], int begin, int dest, int[] memo) { + private static int minJumps(int[] steps, int begin, int dest, int[] memo) { if (begin == dest) return 0; if (steps[begin] == 0)