E.Near interview question

Create a method to check if there's duplicates from a given array