Keep unique values.
Edit the solution, run the checks, and keep your progress in this browser. The exercise includes everything you need.
Question Group · arrays-and-maps
Keep unique values
Return the values that appear in the input, keeping only their first appearance. Preserve the original order.
- The input contains at most 10,000 finite numbers.
- Do not sort the input.
- Return a new array.
Loading the browser IDE…