Find Duplicates
Lesson 9 of 12 in Coddy's Python Interview Series course.
Challenge
MediumWrite a function get_duplicates that gets,
a1- integer-array
Need to find out all the duplicate integers present in the list.
Note: If an integer or any items in a list are repeated more than one time, they are duplicates.
Example:
Input - [1,2,3,4,5,5]
Expected Output - [5]
Try it yourself
def get_duplicates(a1):
# Write code hereAll lessons in Python Interview Series
1Crack Python Coding Interview
Lesser of two evensPangram Unique ElementsAnimal CrackersSpy GameMatching StringPalindrome or NotBlackJackFind DuplicatesEncodeHash 33First Non-Repeating Character