Ok, I'm encountering this weird result when performing:
l = [2, 5, 2, 6, 7, 3, 7, 5, 7, 0, 6, 10]
r = median(l)
The r becomes 11/2 which is 5.5. The median here is clearly an integer and it is 5!
Why does it return 5.5?
1 | initial version |
Ok, I'm encountering this weird result when performing:
l = [2, 5, 2, 6, 7, 3, 7, 5, 7, 0, 6, 10]
r = median(l)
The r becomes 11/2 which is 5.5. The median here is clearly an integer and it is 5!
Why does it return 5.5?