← Microsoft questions

Min sum of absolute differences from three arrays

Filed under Microsoft

Given three arrays each containing distinct positive numbers, find three numbers a, b, and c from each respective array such that abs(a-b) + abs(b-c) + abs(c-a) is minimized.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.