In statistics, the mode of a set of values is the value thatoccurs most often or with the greatest frequency. Write a functionthat accepts as arguments the following:
- An array of integers
- An integer that indicates the number of elements in thearray
The function should determine the mode of the array. That is, itshould determine which value in the array occurs most often. Themode is the value the function should return. If the array has nomode (none of the values occur more than once), the function shouldreturn −1. (Assume the array will always contain nonnegativevalues.)
Demonstrate your pointer prowess by using pointer notation insteadof array notation in this function.
can someone please help me with this in C++ programminglanguage?