Define a function that removes duplicates from an array of numbers and returns it as a result.
The order of the sequence has to stay the same.
# Using Set:
# Time complexity | O(N)
def distinct(seq):
    result = []
    seen = set()
    for a in seq:   #O(N) operation in terms of time complexity
        if a not in seen:  #O(1) operation in terms of time complexity
            result.append(a)
            seen.add(a)
    return result

# Using Set:
# Time complexity | O(N)
def distinct(seq):
    result = []
    seen = set()
    for a in seq:   #O(N) operation in terms of time complexity
        if a not in seen:  #O(1) operation in terms of time complexity
            result.append(a)
            seen.add(a)
    return result
