Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by juestr
from typing import List
def checkio(data: List[int]) -> [int, float]:
s = sorted(data)
l = len(data)
m = l // 2
return s[m] if l % 2 else sum(s[m-1:m+1]) / 2
April 19, 2019
Comments: