




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Changing the elements into one of the numbers already existing in the array nums is optimal.
Try finding the cost of changing the array into each element, and return the minimum value.