Ad
  • Custom User Avatar

    I need faster algorithm. Problem - to leave only the last occurrences of each element in the sequence; the remaining elements must be removed from the sequence. Thank you.
    Given: 1 2 3 3 2 1 4 1 2 0
    Answer:3 4 1 2 0