Find the first repeated element in a list.
MediumProblem Statement
Find the first repeated element in a list.
Sample Input
[1, 2, 3, 2, 1]
Sample Output
2
Limits
Time: 2s · Memory: 256 MB
Find the first repeated element in a list.
[1, 2, 3, 2, 1]
2
Time: 2s · Memory: 256 MB