Highest Rank Number in an Array in Golang
The challenge
Complete the method which returns the number which is most frequent in the given input array. If there is a tie for the most frequent number, return the largest number among them.
Note: no empty arrays will be given.
Examples
The solution in Golang
Option 1:
Option 2:
Option 3:
|
|
Test cases to validate our solution
|
|