Sponsored
Use these hints if you're stuck. Try solving on your own first.
Say 5 is the only element that occurs the most number of times - for example, nums = [1, 5, 2, 3, 5, 4, 5, 6]. What is the answer?
Solve with full IDE support and test cases