Skip to content

강경민_Best Time to Buy and Sell Stock II#70

Open
mini-inim wants to merge 2 commits intomainfrom
minim2
Open

강경민_Best Time to Buy and Sell Stock II#70
mini-inim wants to merge 2 commits intomainfrom
minim2

Conversation

@mini-inim
Copy link
Contributor

🧑‍💻 언어 및 제출 결과

  • 사용 언어: JavaScript, Python, TypeScript, ...
  • 통과 여부: ✅ / ❌

🧠 풀이 설명

이익을 낼 수 있는 모든 구간을 더함.
i랑 i-1의 차이가 0 이상이면 그만큼 이익에 더한다.

📊 시간/공간 복잡도

  • 시간 복잡도: O(n)
  • 공간 복잡도: O(1)

📝 추가 설명 (선택)

  • 고민했던 포인트가 있다면 간단히 적어주세요.

🙋‍♂️ 리뷰어에게

  • 리뷰어가 보면 좋을 포인트, 질문, 궁금한 점 등을 작성해 주세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant