Home
Classrooms
Courses
About Us
Resources
Members
More
https://codingbat.com/prob/p146974
Comment your solution to the problem to this post.
public boolean scoresIncreasing(int[] scores) {
for ( int i = 0; i < scores.length; i ++){
if (scores[i] >= scores[i -1] )break;
else continue;
if (scores[i] <= scores[i + 1] );
return true;
else return false;
}
// By Jerry Yi public boolean scoresIncreasing(int[] scores) { for (int i = 1; i < scores.length; i++) { if (scores[i] >= scores[i-1]) continue; else return false; } //passed all checks >= return true; }
thx man
public boolean scoresIncreasing(int[] scores) {
for ( int i = 0; i < scores.length; i ++){
if (scores[i] >= scores[i -1] )break;
else continue;
if (scores[i] <= scores[i + 1] );
return true;
else return false;
}
}
// By Jerry Yi public boolean scoresIncreasing(int[] scores) { for (int i = 1; i < scores.length; i++) { if (scores[i] >= scores[i-1]) continue; else return false; } //passed all checks >= return true; }