Subtopic: 2-diff
Question 0 : 2sum, given a sorted array, determines if there isa pair of elements sum to target
Question 1: 2 -dff, how many pairs diff = target(<target, >target), where target > 0?
Question 1.1: How many pairs with diff = x- y = target in a sorted array without duplicates?
Solution 1: Brute Force
Solution 2: 2-pointer

Q1.2 A little Advance Version: how many pairs with diff > target
Q1.3 The array is unsorted , different is |x-y|
Q2 Given a sorted integer array, find unumber of subsets satisfying the property of max(subset) - min (subset) <= target
Last updated