← All problemsSign in

2206. Divide Array Into Equal Pairs

LeetCodeArrayHash TableBit ManipulationCountingOpen on judge ↗

You are given an integer array nums consisting of 2 * n integers. You need to divide nums into n pairs such that: - Each element belongs to exactly one pair. - The elements present in a pair are equal. Return true if nums can be divided into n pairs, otherwise return false. Example 1: Input: nums = [3,2,3,2,2,2] Output: true Explanation: There are 6 elements in nums, so they should be divi

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start