An integer array original is transformed into a doubled array changed by appending twice the value of each element in original to itself, and then randomly shuffling the elements.
Given an array changed, return the array original if changed is a valid doubled array. If changed is not a doubled array, return an empty array. The elements in original may be returned in any order.
Constraints:
changed.length
changed[i]
An integer array original is transformed into a doubled array changed by appending twice the value of each element in original to itself, and then randomly shuffling the elements.
Given an array changed, return the array original if changed is a valid doubled array. If changed is not a doubled array, return an empty array. The elements in original may be returned in any order.
Constraints:
changed.length
changed[i]