← Optum (UnitedHealth Group) questions

Sort an array of pairs

Filed under Optum (UnitedHealth Group)

Given an array of pairs, write a function to sort the array. Typically, pairs are sorted primarily by their first element, and secondarily by their second element if the first elements are equal.

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 Optum (UnitedHealth Group) questions

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