Skip to content

김유빈_Best Time to Buy and Sell Stock#51

Open
luwbe1 wants to merge 3 commits intomainfrom
feature/yubin3
Open

김유빈_Best Time to Buy and Sell Stock#51
luwbe1 wants to merge 3 commits intomainfrom
feature/yubin3

Conversation

@luwbe1
Copy link
Copy Markdown

@luwbe1 luwbe1 commented Jul 30, 2025

🧑‍💻 언어 및 제출 결과

  • 사용 언어: TypeScript
  • 통과 여부: ✅

🧠 풀이 설명

  • 최소 가격, 최대 이익을 미리 선언해둡니다.
  • 루프를 돌면서 현재 가격이 최소 가격보다 낮으면 업데이트하고, 최대 이익은 현재 가격에 최소 가격을 뺀 값이 최대 이익보다 크면 업데이트 합니다.

📊 시간/공간 복잡도

✅ 어떠한 근거로 시간/공간 복잡도가 이렇게 나왔는지 설명해주세요.

⚡️ 풀이의 속도와 메모리 등을 캡쳐해서 올려주세요.

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

📝 추가 설명 (선택)

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

🙋‍♂️ 리뷰어에게

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

@luwbe1 luwbe1 added the TeamD Team label for TeamD label Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TeamD Team label for TeamD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant