Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Delivery Drone by tokiojapan55
from typing import List
def delivery_drone(orders: List[int]) -> int:
carry = lambda p,m,i,t:t+i if not p else min([m]+[carry(p-{(n,o)},m,o,t+abs(n-i)+abs(n-o)) for n,o in p])
return carry({(i,o) for i,o in enumerate(orders) if o},len(orders)**2,0,0)
Dec. 23, 2024