This was a problem that caused my AP class a lot of trouble. It took us 3 months to figure it out. The answer is really simple if you know a little java.
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 // this is what the output is
scoresIncreasing({1, 3, 2}) → false // supposed to look like.
scoresIncreasing({1, 1, 4}) → true
Tags: