Given an array $A$ of $n$ integer elements, count the number of dominant elements in the array. An element is considered dominant if it is greater than all the elements to its right in the array.
The last element cannot not be a dominant element as there is no element to its right in the array.
5
4 3 2 5 1
Output:
1