Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yoonthecoder] Week 5 #870

Merged
merged 3 commits into from
Jan 12, 2025
Merged

[yoonthecoder] Week 5 #870

merged 3 commits into from
Jan 12, 2025

Conversation

yoonthecoder
Copy link
Contributor

@yoonthecoder yoonthecoder commented Jan 8, 2025

답안 제출 문제

체크 리스트

  • 우측 메뉴에서 PR을 Projects에 추가해주세요.
  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@yoonthecoder yoonthecoder added the js label Jan 8, 2025
@yoonthecoder yoonthecoder requested a review from a team as a code owner January 8, 2025 00:50
@yoonthecoder yoonthecoder changed the title best time to buy and sell stock solution [yoonthecoder] Week 5 Jan 8, 2025
@@ -0,0 +1,13 @@
var maxProfit = function (prices) {
// set the initial value to Infinity so that it can always return minimum value
let minPrice = Infinity;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minPrice를 Infinity로 지정하신건
for문의 시작값을 0으로 하여 첫 번째 가격도 최소 값이 될수 있도록 하신걸까요?
저는 인덱스를 1부터 시작했는데 이런 방법도 있었군요~!👍

Copy link
Contributor

@TonyKim9401 TonyKim9401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5주차 문제 풀이 고생 많으셨습니다!

@TonyKim9401 TonyKim9401 merged commit f916b90 into DaleStudy:main Jan 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants