
[LeetCode] 2206. Divide Array Into Equal Pairs (Python)
·
알고리즘/LeetCode
난이도: EasyProblem DescriptionYou 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. Problem ExampleExample 1:Input: nums = [3,2,3,2,2,2]Output: trueExplanation: There are 6 elements in nu..