← 返回 google 的题目列表Remove Duplicates in Order
类型:online_judge
Given a character array, return the array with duplicates removed in order.
Example:
Input: ['A', 'A', 'B', 'A', 'C']
Output: ['A', 'B', 'C']
Constraints:
The length of the input character array is within [0, 10000]
Input characters are single uppercase letters
Do not use extra space
Preserve the original order of characters
Example
Input
5
A
A
B
A
C