Basically there is a logical problem in the flow of execution. Let me break it down with pseudocode.
for each element in the array
if element is less than or equal to the next element
...
Type: Posts; User: ChristopherLowe
Basically there is a logical problem in the flow of execution. Let me break it down with pseudocode.
for each element in the array
if element is less than or equal to the next element
...
So why does {3, 2} return false while {1, 3, 2} return true? What happens when the loop runs the first time?
What do you get when you try this:
scoresIncreasing({3, 2})