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.