ByteDance Interview Question

Remove duplicates in an array