Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
Closest Value Pair
Medium
An inventory system has two sorted product catalogs A and B. Each value in the catalog represents a product size. Find a pair [a, b] where a comes from catalog A and b comes from catalog B such that the absolute size difference |a - b| is minimized.
If multiple pairs achieve the same minimum difference, return the one with the smallest a. If there is still a tie on a, return the one with the smallest b.
...
Asked at:LinkedIn
More LinkedIn interview questions
- Digit Replacement Maximizermedium
- Distribution Center Placementmedium
- Manual String Substitutionmedium
- Combine N-ary Treeshard
- Balanced Parentheseseasy
- Words From Phone Numbermedium
- Circular Signal Windowmedium
- Minimum Cost To Decorate Cakesmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.