Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.05 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.05 KB

Write Some Code

What to do

In this excercise, you will write a program. That's it.

  • You choose the language, libraries, and editor
  • You decide how to verify that it works
  • You can use technical references for your language, libraries, etc
  • You cannot look up how to implement the algorithm
  • You cannot use a library or language feature that already implements the algorithm

The problem

Input

Input to your program is a possibly empty sequence of integers, in some data structure convenient to your language and library choices. The sequence is not ordered and it might contain multiple integers with the same values. You will never receive a non-integer so your program does not need to guard against invalid input.

For example, 8, 2, 5, 3, 2, 2, 1, 5, 4, 4, 7 .

Output

Output from your program is also a sequence of inegers.

Behavior

Your program must remove all duplicates but otherwise retain the original order of the sequence. For the example, the output sequence corresponding to the example input is 8, 2, 5, 3, 1, 4, 7 .