Problem 2007 · Medium

Find Original Array From Doubled Array

Recover the original array from a doubled array, or report that it is impossible. The visual sorts the values and pairs each smallest remaining value with its double.

Open the interactive visualisation