BOJ 1874 스택 수열


https://www.acmicpc.net/problem/1874


https://github.com/simjaemun2/BaekJoon/blob/ddca9cb6c5182a2621cd2c01829daedd8bab1c56/BOJ1874/BOJ18874.cpp


분류 : 스택


난이도 : MH


cnt = 스택에 push 한 값


cnt < input

-> 계속 push


스택.탑 != a

-> 답 없음

else

-> 팝, 다음 단계 계속

'컴퓨터공학 > Program Solving' 카테고리의 다른 글

BOJ 10472 십자뒤집기  (0) 2016.11.27
BOJ 11004 K번째 수  (0) 2016.11.27
BOJ 2580  (0) 2016.11.27
BOJ 2776 암기왕  (0) 2016.11.27
BOJ 2573 빙산  (0) 2016.11.26

BOJ 10799 쇠막대기


https://www.acmicpc.net/problem/10799


https://github.com/simjaemun2/BaekJoon/blob/f863f80281b64f325831043f2d57789e125de9b6/BOJ10799/BOJ10799.cpp


난이도 : M


분류 : 스택

'컴퓨터공학 > Program Solving' 카테고리의 다른 글

BOJ 1007 Vector Matching  (0) 2016.11.26
BOJ 2644 촌수계산  (0) 2016.11.26
BOJ 11729 하노이 탑 이동 순서  (0) 2016.11.26
BOJ 2583 영역 구하기  (0) 2016.11.25
BOJ 2636 치즈  (0) 2016.11.22

[Implement Stack using Queues]

https://leetcode.com/problems/implement-stack-using-queues/


[Implement Queue using Stacks]

https://leetcode.com/problems/implement-queue-using-stacks/


stack, queue를 2개씩 만들어서, 하나의 stack or queue에 pop()할 item을 하나씩 유지


[Simplify Path]

https://leetcode.com/problems/simplify-path/


stack

Python "///".split("/") = ['','','',''] 과 같이 리턴

'컴퓨터공학 > Program Solving' 카테고리의 다른 글

[Leetcode] 160302  (0) 2016.03.02
[Leetcode] 160301  (0) 2016.03.02
[leetcode]160225  (0) 2016.02.25
[leetcode.com] 160224  (0) 2016.02.24
[leetcode.com] 160223  (0) 2016.02.23

+ Recent posts