Remove Duplicates (Keep Order)

PHP Medium 5 views
Back to Questions

Problem Description

Remove duplicates but keep the first time each value appears.

Input Format

First n. Next line n integers.

Output Format

One line unique values.

Sample Test Case

Input:
8 1 2 1 3 2 4 4 5
Output:
1 2 3 4 5

Constraints

n

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next