I might have an array that looks like the following:
[1, 4, 2, 2, 6, 24, 15, 2, 60, 15, 6]
Or, reall
Here is a solution that
NS
O(n)
extension Array where Element: Hashable { var uniqueValues: [Element] { var allowed = Set(self) return compactMap { allowed.remove($0) } } }