Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Replace with Biggest by rybld2
from typing import Iterable
def replace_biggest(data: list[int]) -> Iterable[int]:
if not data : return data
res=[max(data[i + 1:]) for i in range(len(data) - 1) ]
res.append(-1)
return res
Nov. 10, 2022
Comments: