Spot the Repeat
easyA ticketing system logs the seat numbers it has issued. A bug may have issued the same seat twice.
Given the list seats, return True if any seat number appears more than once, otherwise False.
Example 1
in seats = [1, 2, 3, 1]
out True
Seat 1 was issued twice.
Example 2
in seats = [1, 2, 3, 4]
out False
Constraints
- · 1 <= len(seats) <= 10^5
- · -10^9 <= seats[i] <= 10^9
solution.py● loading python…
test results
Hit ▶ Run to test your code against the visible cases.