Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
All the elements in the array should be counted except for the minimum and maximum elements.
If the array has n elements, the answer will be n - count(min(nums)) - count(max(nums))
This formula will not work in case the array has all the elements equal, why?