Sollicitatievraag bij Trendlyne

Given an array of numbers which have few duplicates. You need to write a program to return a array with unique elements. Also make sure this should be inplace which means you can't use any other data structures.