HCLTech interview question

Remove the duplicate elements from an array