This problem evaluates algorithmic selection and geometric computation skills—filtering eligible dashers, calculating Euclidean distances, and applying deterministic tie-breaking—within the Coding & Algorithms domain at an implementation-level algorithmic abstraction.
You need to assign an order to a dasher.
Input:
order
with a pickup location
(x, y)
.
dashers
, each with:
id
(x, y)
is_available
boolean
Requirements:
dasher_id
, or
null
if none are available.
Task: Implement the selection function and analyze its time complexity.