Chubb interview question

Coding Task on Remove duplicate elements in arrays