Optimize the given Python program and reduce its time complexity.
def find_duplicates(arr): 
    duplicates = [] 
    for index, value in enumerate(arr): 
        if value in arr[index + 1:]: 
            duplicates.append(value) 
    return duplicates
def find_duplicates(arr): 
    seen = set() 
    duplicates = []
    for value in arr:
        if value in seen:
            duplicates.append(value)
        else:
            seen.add(value)
    return duplicates