heights, the heights of some participants. Count how many elements have both a strictly smaller and a strictly larger value somewhere in the list.
If a value appears several times, each occurrence is counted separately.heights=[170, 155, 182, 170] → 2
Both 170s are taller than 155 and shorter than 182. The shortest and the tallest do not count.
heights=[5, 5, 5] → 0
All values are equal, so nobody has a strictly smaller value in the list.
heights=[-2, 0, 9, 4, -2] → 2
heights=[170, 155, 182, 170]
2
Run checks the first 3 tests in your browser. Submit checks all 123 tests on the server, hidden ones included.