문제https://school.programmers.co.kr/learn/courses/30/lessons/42584 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 문제 풀이 (Java)import java.util.*;class Solution { public int[] solution(int[] prices) { int[] answer = new int[prices.length]; Stack stack = new Stack(); for (int i = 0; i prices[i]) { answer[stack.peek()[1]] = i - stack.peek()[1]; stack.pop();..