Practice
Leaderboard
Profile
Login
Logout
Code Practice
Code Practice
//Returns the most frequent integer in the given array. //If multiple numbers are tied for highest frequency, return the largest of them. //Examples: // mostFrequentInt([1,2,3,1]) -> 1 // mostFrequentInt([1,2,3]) -> 3 // mostFrequentInt([4]) -> 4 //Constraints: // 1 <= arr.length <= 1000 // -2147483647 <= arr[i] <= 2147483647 function mostFrequentInt(arr) { return -1; }
Run Tests
Ran
0
tests