I need to find an algorithm for finding the modal value of an array of numbers. I have the array organized in an ascending order. I suspected that the algorithm would be something like what you would use for a bubble sort, but I can't seem to make it work. Hopefully somebody can clue me in. Thanks.

The array is a total of 10 numbers.