Task 8 of 9 · 0 solved · 9 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

5.2 Array algorithms — is it sorted?

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in isSorted so that it returns whether the array is in non-decreasing order.

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.

Your solution