[LeetCode] #232. Implement Queue using Stacks (python)
문제 https://leetcode.com/problems/implement-queue-using-stacks/ Implement Queue using Stacks - 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 스택을 사용해서 큐를 구현하는 문제다. 예시 입출력 Input ["MyQueue", "push", "push", "peek", "pop", "empty"] [[], [1], [2], [], [], []] Output [null, null, null, ..
2022. 2. 24.
[LeetCode] #739. Daily Temperatures (python)
문제 https://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 온도 리스트가 주어진다. 해당 온도보다 더 따뜻해질때까지 기다려야 하는 날짜를 리스트로 반환하고 따뜻해지지 않으면 0으로 반환한다. 예시 입출력 Input: temperatures = [73,74,75,71,69,72,76,73] Output: [1,1,4,2,1,1,0,0] 풀이 책 ..
2022. 2. 24.