Remove Duplicates Problem
Remove Duplicates Problem — ExecCode School DSA Practice
Solve the Remove Duplicates problem on ExecCode. Free online school DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given a whole number for the problem Remove Duplicates. Your task is to print the list again, but this time, only show each number once. You will first read a number, then a list of numbers on the next line. Some numbers in the list might be repeated. Keep the numbers in the same order they appeared the very first time.
Examples
Input 5 1 2 2 3 4; Output 1 2 3 4. Input 3 5 5 5; Output 5
Constraints
None
Practice Remove Duplicates free on ExecCode. Browse DSA problems, topic map, and placement guides.