Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Final Stone by Tinus_Trotyl
def final_stone(stones: list[int]) -> int:
while len(stones) > 1: stones = (sst := sorted(stones))[:-2] + [sst[~0] - sst[~1]]
return stones[0] if stones else 0
July 21, 2022
Comments: