Skip to content
HTQHow To Quant
← Problem Bank

Unique Elements

CalcEasy~10 min· Algorithms
Problem

Given an array of integers, remove the duplicates and return the unique elements.

Variants

  • A. You may use extra memory. What is the time complexity?
  • B. You may not use any extra memory beyond iterators, and you may destroy the input. What changes?

State the time and space complexity of each.