Count Pairs with the Minimum Absolute Difference
Company: Shield Ai
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Technical Screen
Quick Answer: Count unordered index pairs whose values have the minimum absolute difference in an integer array. Sorting reveals the minimum gap, while duplicate runs require combinatorial counting; the target complexity is O(n log n).