Back to all patterns

Hash Map / Two Pointers

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Hash Map / Two Pointers pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (1)

Max Number of K-Sum Pairs

Return the maximum number of operations where you pick two numbers whose sum equals k and remove them.

Key Signals:

Count pairsSum equals targetHash map for frequency