I have a problem concering modes. I was asked to determine the mode of an array which the user inputs. I am supposed to write a function that accepts an array of integers, and an integer that indicates the number of elements in the array. The mode is the value the function returns, if no mode then return -1. I have not figured the correct way to detemine the mode yet.
Any help would be greatly appreciated!!
(mode was defined as any number that occurs more than one in the array, if none than a value of -1 would be returned)