Clarivate Interview Question

Remove duplicates in an array without extra space