All Index Pairs Whose Values Sum to K

Problem: All Index Pairs Whose Values Sum to K

Given an unsorted integer array nums and an integer K, return every index pair (i, j) satisfying:

  • 0 <= i < j < len(nums)
  • `nums[i] + ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: