Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
recursion once more too light solution in Clear category for Shorter Set by rybld2
def remove_min_max(data: set, total: int) -> set:
if total >= len(data) / 2: return set()
if total == 0: return data
return remove_min_max( {d for d in data if d not in {max(data), min(data)}}, total -1)
Nov. 6, 2021