input: from typing import List
  
  def removeDuplicates(array: List[int]) -> List[int]:
      """Remove duplicates from the given list of integers and return the modified array.
      >>> removeDuplicates([1, 2, 2, 3, 4, 4, 5])
      [1, 2, 3, 4, 5]
      >>> removeDuplicates([7, 8, 7, 9, 8, 10])
      [7, 8, 9, 10]
      """
output:     seen = set()
      result = []
      for num in array:
          if num not in seen:
              seen.add(num)
              result.append(num)
      return result