Max Number of K-Sum Pairs
Pair up values whose sum equals k, using each value at most once, to maximize the number of pairs. The visual sorts the values and moves two pointers toward each other.
Pair up values whose sum equals k, using each value at most once, to maximize the number of pairs. The visual sorts the values and moves two pointers toward each other.