[Programmers] 주식가격
Python
import collections
def solution(prices):
answer = []
q: deque = collections.deque(prices)
while q:
count = 0
temp = q.popleft()
for i in q:
count += 1
if temp > i:
break
answer.append(count)
return answer
댓글남기기