PhonePe interview question

Programming on Removing duplicates in Java arrays