Five lines in, three unique lines out
- Input
- b a b c a (5 lines)
- Working
- The second b repeats line 1 and the second a repeats line 2, so both are dropped. First occurrences stay in their original order.
- Result
- Output: b, a, c — 5 total, 3 kept, 2 removed