반응형
leetcode.com/problems/daily-temperatures/
Daily Temperatures - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
각각 현재 날짜를 기준으로, 현재보다 더 온도가 높은 날이 있기까지 며칠이 걸리는지를 구하는 문제.
stack을 사용해서 풀 수 있는, 백준 '오큰수' 와 완전히 동일한 문제.
[Python] 백준 17298. 오큰수
스택을 사용해 풀 수 있는 문제. _ = input() # len(arr) 값과 똑같아서 패스 arr = list(map(int, input().split())) stack = [] # 값이 없으면 -1을 입력해야 하므로, 기본값으로 -1 설정 result = [-1 for _ i..
inspirit941.tistory.com
반응형
'프로그래밍 > 코딩테스트 문제풀이' 카테고리의 다른 글
[Python] 프로그래머스. 예상 대진표 (Level 2) (0) | 2020.10.29 |
---|---|
[Python] LeetCode 3. Longest Substring without repeating characters (0) | 2020.10.27 |
[Python] LeetCode 234. Palindrome Linked List (0) | 2020.10.23 |
[Python] LeetCode 121. Best time to buy and sell stock (0) | 2020.10.21 |
[Python] LeetCode 238. Product of Array Except self (0) | 2020.10.19 |