Question: C++ programming Define a function that takes an array as a parameter. It must return true if the elements of the array are monotonic, otherwise,
C++ programming

Define a function that takes an array as a parameter. It must return true if the elements of the array are monotonic, otherwise, it returns false. An array is monotonic if every consecutive element is greater than or equal to the current element, or every consecutive element is less than or equal to the current element
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
