mixed.
Recover the original array. If mixed could not have been produced this way, return an empty list.
The elements of the original array may be returned in any order.mixed=[10, 3, 5, 6] → [3, 5]
The original was [3, 5]: 6 and 10 were added and everything got shuffled.
mixed=[4, 2, 2, 8] → []
One 2 pairs with the 4, but the other 2 and the 8 are left without partners, so this cannot be a doubled array.
mixed=[0, 0, 7, 14] → [0, 7]
mixed=[10, 3, 5, 6]
[3, 5]
Run checks the first 3 tests in your browser. Submit checks all 116 tests on the server, hidden ones included.