Search
⌘K

Leetcode 1200. Minimum Absolute Difference

Find all pairs of distinct integers that achieve the minimum absolute difference; the typical approach is to sort the array and collect adjacent pairs with the smallest gap, returning them in ascending order.

Asked at:

Amazon

Amazon


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid November, 2024

Amazon

Amazon

Mid-level

Optimize network connection between data centers and servers. Given positions of n data centers and n servers on a 1-dimensional line, determine the minimum lag to establish the entire network. Lag is defined as the absolute difference between data center and server positions.

Comments

Your account is free and you can post anonymously if you choose.