8000 Create [스택-큐] 같은 숫자는 싫어 jamin.py #30 · jaminleee/algorithm-study@99af465 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99af465

Browse files
committed
Create [스택-큐] 같은 숫자는 싫어 jamin.py da-in#30
1 parent 09e0799 commit 99af465

File tree

1 file changed

+9
-0
lines changed
  • Programmers - 고득점 Kit/[스택-큐] 같은 숫자는 싫어

1 file changed

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

0 commit comments

Comments
 (0)
0