Sponsored
Use these hints if you're stuck. Try solving on your own first.
Work backwards: try to go from nums to arr.
You should try to divide by 2 as much as possible, but you can only divide by 2 if everything is even.
Solve with full IDE support and test cases