Available question text
Count the number of index pairs (i<j) for which the absolute sum/difference of the pair satisfies both min(|a−b|,|a+b|) ≤ min(|a|,|b|) and max(|a−b|,|a+b|) ≥ max(|a|,|b|). The challenge is to algebraically characterize these absolute-value conditions so you can count qualifying pairs efficiently (n up to 1e5) rather than testing all O(n^2) pairs.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Meta
Leetcode 3649. Number of Perfect Pairs
Interview reported: Jul 31, 2026 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source