Algorithm · Meta · Easy
For an integer array, return the collection of values that occur uniquely after duplicates are removed. Create a function that accepts an integer array and produces an array containing those distinct values. Account for the algorithm's running time and memory usage. Include tests for an empty input, an input whose values are already distinct, and an input made entirely of repeated values. You may use supporting structures such as a set or dictionary. Example
Checking your access…