# 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
2019/10/09 - [Computer/General] - 정보처리기사 실기/필기 - IT신기술동향_전산영어 요점 정리
정보처리기사 실기/필기 - IT신기술동향_전산영어 요점 정리
필기 붙어놓고 실기는 미루고 미루다가 마지막 기회라서 부랴부랴 접수하고 벼락치기 중.. 2019/10/07 - [Computer/General] - 정보처리기사 실기/필기 - 업무 프로세스 요점 정리 정보처리기사 실기 *
itdar.tistory.com
LeetCode #999 AvailableCapturesForRook. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,
LeetCode #999 AvailableCapturesForRook. Algorithm,알고리즘,LeetCode,Codefights,CodeSignal,코드파이트,코드시그널,예제,그래프,Graph,example,c++,java,재귀,recursive,datastructure,techinterview,coding,..
itdar.tistory.com