Generation

generate functionThu, 17 Nov 2022

program for median of an sorted array

def median(array): return (array[(len(array) - 1) // 2] + array[len(array) // 2]) / 2.0

Questions about programming?Chat with your personal AI assistant