Tuples and sets

How many unique values are here?

Examples

Worked example

Input
[3, 3, 1, 3, 1]
Expected output
2

Hints and solution

Hint 1

Write down the starting state and walk through one example by hand.

Reveal worked answer

The repeated 3s collapse to one value and the repeated 1s collapse to one value.

Back to the lesson