Equal Difference Pairs

Problem Overview

  • Given two lists of integers (Alice and Bob), count pairs (a, b) with one from each list where their difference satisfies an equal-difference rule.
  • Input: two integer arrays; Output: the number of valid pairs; constraints may bound array sizes and value ranges.
  • Context: compares two datasets to find matches by a specific difference criterion.
  • From Susquehanna_international_group interviews; a common coding interview problem and interview question.

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: