레벨2 문제
from collections import deque
def solution(s):
s = deque(s)
arr = []
while True:
if (len(s) == 0):
break
temp = s.popleft()
if ( len(arr) != 0 and arr[-1] == temp ):
arr.pop()
else:
arr.append(temp)
if ( len(arr) == 0):
answer = 1
else:
answer = 0
return answer