코딩테스트 연습 > 스택/큐 > 탑
-
스택/큐 > 탑프로그래머스(Programmers) 2018. 9. 26. 21:22
https://programmers.co.kr/learn/courses/30/lessons/42588 1. 문제 2. 알고리즘키워드 - 큐 3. 코드 12345678910111213141516171819202122232425262728293031323334353637#include #include #include #include using namespace std; vector solution(vector heights) { vector answer; queue qq1; reverse(heights.begin(), heights.end()); int size = heights.size(); for (int i = 0; i