← 返回 meta 的题目列表Find Unique Elements
类型:online_judge
meta
Given an array of integers, find all unique elements. Implement a function that takes an integer array as input and returns an array of unique elements. Consider both time and space complexity. Test cases include empty arrays, arrays with no duplicates, and arrays where all elements are duplicates. Allowed to use data structures like dictionary or set.
Example
Input
[4, 3, 2, 4, 1, 3, 2]