Live coding interviews.
Candidates write and run code, explain their approach, and answer follow-up questions about their solution.
Arjun K.You
Return the first duplicate in a list.
1def first_duplicate(values):
2 seen = set()
3 for value in values:
4 if value in seen:
5 return value
6 seen.add(value)
7 return NoneWhat would change if the list were too large to fit in memory?


























