PhonePe Interview Question

Programming on Removing duplicates in Java arrays