Given a maximum distance 'dist' and two arrays, 'forward' and 'return', where each element is a pair [id, distance], find all pairs of [forward_id, return_id] such that the sum of their distances is…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.