Data structure that keeps elements in chronological order and doesn't contain duplicates

Правка en1, от Qualified, 2020-07-25 19:00:11

I know that set doesn't contain duplicates, but it sorts the elements. I want a data structure that doesn't sort the elements and doesn't contain duplicates.

For example if the data structure contains ints,

Input: 5 4 1 2 5 4 9

Elements in data structure

5 4 1 2 9

Please help.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Qualified 2020-07-25 19:00:11 380 Initial revision (published)