Search
⌘K

Leetcode 2007. Find Original Array From Doubled Array

Given an array "changed" that was formed by taking some unknown "original", appending twice each element, and shuffling, return any valid original array or [] if impossible. The core challenge is to determine whether the multiset can be partitioned into pairs (x, 2x) (including special handling for zeros and duplicates) using frequency matching in increasing order.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.