Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
What data structure allows us to insert numbers and find the number of distinct numbers in it?
Try using a set, insert all the numbers and their reverse into it, and return its size.