Why the hell is the expected output the entire new array but the function wants me to return only the new length?

Comment body goes here.

You need to return the new length but also edit A so that it does not contain any duplicates. Look at the note

Click here to start solving coding interview questions