Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median of Three by Cyrus490
from statistics import median_high
def median_three(data):
return [n if i <= 1 else median_high(data[i-2:i+1]) for i, n in enumerate(data) ]
Nov. 26, 2020