[Python] 스택큐_주식가격

EunBi Na·2023년 4월 19일
0

링크텍스트

def solution(prices):
    size = len(prices)
    answer = [0] * size
    for i in range(size):
        for j in range(i + 1, size):
            if prices[i] <= prices[j]: answer[i] += 1
            else:
                answer[i] += 1
                break
    return answer
profile
This is a velog that freely records the process I learn.

0개의 댓글