Pergunta de entrevista da empresa eBay

I was asked about a technical leetcode like problem, given an array(unsorted and with duplicates) return an array that is sorted with unique values.