Problems > Common Elements > Editorial

Common Elements — Solution & Editorial

Back to the Problem

Frequency-count both sides and sum the minimum count per shared value.

Complexity: O(N)