Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple and clear solution in Clear category for Median by dunpealer
def checkio(data):
data.sort()
mid = len(data) / 2
imid = int(mid)
if mid != imid:
return data[imid]
return (data[imid-1] + data[imid]) / 2
Aug. 14, 2015