Skip to content

Commit 634da85

Browse files
authored
Update Solution.java
1 parent 863450b commit 634da85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/g0001_0100/s0045_jump_game_ii/Solution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
// #Algorithm_II_Day_13_Dynamic_Programming #Dynamic_Programming_I_Day_4
55
// #Big_O_Time_O(n)_Space_O(1) #2024_11_10_Time_0_ms_(100.00%)_Space_44.9_MB_(75.73%)
66

7-
class Solution {
7+
public class Solution {
88
public int jump(int[] nums) {
99
if (nums.length == 1) {
1010
return 0;
1111
}
1212
return minJumps(nums, 0, 0);
1313
}
1414

15-
private static int minJumps(int[] nums, int currIndex, int jumpStatus) {
15+
private int minJumps(int[] nums, int currIndex, int jumpStatus) {
1616
if (currIndex + nums[currIndex] >= nums.length - 1) {
1717
return jumpStatus + 1;
1818
}

0 commit comments

Comments
 (0)