Project Estimates
Problem Overview
- Count the number of distinct pairs in projectCosts whose absolute difference equals target; pairs differ in at least one value.
- Input: int[] projectCosts (n, 5<n<=2e5, unique values 1..2e9) and int target (1..1e9); Output: int count of such pairs.
- Real-world context: analyze project bid estimates to find specific cost gaps.
- Asked in Goldman interviews; a coding interview problem and interview question focused on arrays and differences.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
