# Process (list)
# 1. Input prices list
# 2. Iterate i from begin to the end
# 2.1. Iterate j from i to the end
# 2.1.1. Check if [j] is smaller than [i]
# 2.1.1.1. If so - it's done
# 2.1.2. Count
# 2.2. Add to answer_list
# 3. Return answer_list
# 왜 스택 문제인지? 봐야함. 굳이?
def solution(prices):
answer_list = []
for i in range(0, len(prices)):
isDone = False
count = 0
j = i
while (j < len(prices) and not isDone):
count+=1
if prices[i] > prices[j]:
isDone = True
j+=1
answer_list.append(count-1)
return answer_list
해시 04 - 베스트앨범, 프로그래머스, 알고리즘, Programmers, Hash, 코딩테스트, Algorithm, 풀이과정
# Process # 1. Input answers # 2. Make math throwers answers # 3. Compare answers and math throwers' answers # 4. Get people who got highest score # 5. Return result # 문제..
itdar.tistory.com
2020/10/07 - [Life/Item review] - Lenovo 레노보 씽크패드 Thinkpad 빨콩 무선키보드/블루투스/울트라나브2/트랙키보드 구매 후기
Lenovo 레노보 씽크패드 Thinkpad 빨콩 무선키보드/블루투스/울트라나브2/트랙키보드 구매 후기
빨콩 + 키감 + 무선 울트라나브2 를 기다리다가 최근 나왔길래 고민안하고 샀다. -> 가격 13만 5천원 내외였던 것 같은데 음.. 가성비는 그닥 -> 빨콩 예전 x1 이후에 간만에 빨콩을 쓰니 손이 잘 안
itdar.tistory.com
LeetCode #922 SortArrayByParity2. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,
LeetCode #922 SortArrayByParity2. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,그래프,Graph,example,c++,java,재귀,recursive,datastructure,techinterview,coding,코딩인..
itdar.tistory.com