8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0243d80 commit c550ab3Copy full SHA for c550ab3
src/main/java/com/fishercoder/solutions/_45.java
@@ -18,12 +18,12 @@
18
public class _45 {
19
20
public static class Solution1 {
21
- 7781 public int jump(int[] A) {
+ public int jump(int[] nums) {
22
int stepCount = 0;
23
int lastJumpMax = 0;
24
int currentJumpMax = 0;
25
- for (int i = 0; i < A.length - 1; i++) {
26
- currentJumpMax = Math.max(currentJumpMax, i + A[i]);
+ for (int i = 0; i < nums.length - 1; i++) {
+ currentJumpMax = Math.max(currentJumpMax, i + nums[i]);
27
if (i == lastJumpMax) {
28
stepCount++;
29
lastJumpMax = currentJumpMax;
0 commit comments