list 에서의 x in s 연산의 평균 시간 복잡도 : O(n) set 에서의 x in s 연산의 평균 시간 복잡도 : O(1)
list
x in s
O(n)
set
O(1)
set 을 사용하자!