Free written solutionDivide Array Into Equal Pairs (LeetCode 2206): Solution and Explanation
Given an array of 2n integers, decide whether it can be split into n pairs of equal values. [3,2,3,2,2,2] works as (2,2), (2,2), (3,3), while [1,2,3,4] does not.
Read the intuition, approach, code and complexity →