Menu
Coddy logo textTech

Find Duplicates

Lesson 9 of 12 in Coddy's Python Interview Series course.

challenge icon

Challenge

Medium

Write 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 here

All lessons in Python Interview Series