Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 딥러닝
- 프롬프트 엔지니어링
- ChatGPT
- GPT
- AI 트렌드
- LLM
- supervised ml
- Deep Learning
- coursera
- nlp
- Unsupervised Learning
- 인공신경망
- Scikitlearn
- bingai
- neural network
- ML
- feature scaling
- learning algorithms
- 인공지능
- 챗지피티
- 언어모델
- 머신러닝
- Supervised Learning
- Regression
- llama
- Andrew Ng
- Machine Learning
- prompt
- feature engineering
- AI
Archives
- Today
- Total
My Progress
[Leetcode] 739. Daily Temperatures 본문
반응형
Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.
A key point of this question was to make the stack in ascending order. Since we are finding the number of days for ith day to get a warmer temperature, it is easy to traverse the array in reverse order. Since we are only finding the closest day with a warmer temperature, we can simply pop a smaller value in our stack as we are traversing.
반응형
'Coding Problems' 카테고리의 다른 글
853. Car Fleet (0) | 2025.02.13 |
---|