Count Pairs with the Minimum Absolute Difference
Company: Shield Ai
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Technical Screen
Overview: 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).
Read the full Shield Ai Software Engineer interview experience this question came from