Given an array arr[] of size N, find the total number of peak elements in the array.
Level: - Easy PM
Note:-
An element is called a peak element if its value is not smaller than the value of its adjacent elements(if they exist).
Input:-
First-line contains N(size of the array).
Second-line consists of the array.Output :-
1) Print total number of peak elementsExample:-
Input
arr= 2,3,1,6,7
Counter
Output
2