@sk1
You can use a while loop, and keep on incrementing index until the values are decreasing, if a value comes whose value is greater than equal to value of that previous one, then break from the loop
Make another while loop, and keep on incrementing index until the values are increasing, if a value comes whose value is less than equal to the previous value, then break.
Lastly check if that index has reached to end of the list, if yes than output ‘true’ else output ‘false’.
Hope this resolved your doubt.