Fill in isSorted so that it returns whether the array is in non-decreasing order.
isSorted
The program prints true, false, true — a single element is always sorted. Stop the loop one step early, or you will read past the end.
true
false