Skip to content

Commit c77034a

Browse files
committed
1 parent d660316 commit c77034a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def solution(s):
2+
answer = 1
3+
match_box = list()
4+
for i in range(len(s)) :
5+
match_box.append(s[i])
6+
if len(match_box) > 1 :
7+
if match_box[-2] == match_box[-1] :
8+
match_box.pop()
9+
match_box.pop()
10+
11+
if len(match_box) > 0 :
12+
return 0
13+
14+
return answer

0 commit comments

Comments
 (0)