|In a PHP program example, an array called grades is supposed to have been sorted in decreasing order, e.g., [100, 98, 95, …]. |
How to write a function called function isSorted($grades) to check if the grades array has been sorted correctly. If yes, the function returns true, otherwise returns false.
Your response is appreciated.