DXC Technology interview question

Duplicate numbers in array and Ascending order