DoorDash Interview Question

Easy stock trade problem