Back
Two Pointers
Question 1 of 14
7% Complete
Easy
Given a sorted array, find if any pair has difference exactly K.
A
Two pointers moving forward (read/read)
B
Hash set with complements
C
Sliding window with fixed size
D
Binary search per element
Need a hint?
Move two pointers based on difference