You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Given an array arr of size n which contains elements in range from 0 to n-1, you need to find all the elements occurring more than once in the given array. Return the answer in ascending order.
# If no such element is found, return list containing [-1].
# Code:
def duplicates(arr):
dic={}
new=[]
#for dictionary manipulations we can use get keyword also ...