## Problem:

Given an array of scores, return true if each score is equal or greater than the one before. The array will be length 2 or more.

scoresIncreasing({1, 3, 4}) → true
scoresIncreasing({1, 3, 2}) → false
scoresIncreasing({1, 1, 4}) → true

## Solution:

public boolean scoresIncreasing(int[] scores) {
boolean match = false;
for (int i = 0; i < scores.length-1; i++) {
if (scores[i+1] >= scores[i])
match = true;
else
return false;
}
return match;
}

1. public boolean scoresIncreasing(int[] nums) {
for (int i = 0; i < nums.length; i++) {
if(i+1nums[i+1]){
return false;

}
}
}
return true;
}

2. public boolean scoresIncreasing(int[] nums) {
for (int i = 0; i < nums.length; i++) {
if(i+1nums[i+1]){
return false;

}
}
}
return true;
}

3. Don't know why didn't my code uploaded successfully that's why i am trying it for third time........
public boolean scoresIncreasing(int[] scores) {
for (int i = 0; i < scores.length; i++) {
if(i+1scores[i+1]){
return false;

}
}
}
return true;
}

1. Still not done...Please correct it from line 3
if(i+1scores[i+1]){
return false;}}

4. public boolean scoresIncreasing(int[] scores) {
for(int i = 0; i< scores.length-1;i++){
if(scores[i]>scores[i+1]){
return false;
}
}
return true;
}

5. won't the code return b at the end regardless of if the else statement executed or not?

6. wouldn't the return b at the end execute regardless if the else statement executed or not?