Skip to content

[sangbeenmoon] WEEK 9 Solutions#2580

Merged
sangbeenmoon merged 2 commits intoDaleStudy:mainfrom
sangbeenmoon:main
May 1, 2026
Merged

[sangbeenmoon] WEEK 9 Solutions#2580
sangbeenmoon merged 2 commits intoDaleStudy:mainfrom
sangbeenmoon:main

Conversation

@sangbeenmoon
Copy link
Copy Markdown
Contributor

@sangbeenmoon sangbeenmoon commented May 1, 2026

๋‹ต์•ˆ ์ œ์ถœ ๋ฌธ์ œ

์ž‘์„ฑ์ž ์ฒดํฌ ๋ฆฌ์ŠคํŠธ

  • Projects์˜ ์˜ค๋ฅธ์ชฝ ๋ฒ„ํŠผ(โ–ผ)์„ ๋ˆŒ๋Ÿฌ ํ™•์žฅํ•œ ๋’ค, Week๋ฅผ ํ˜„์žฌ ์ฃผ์ฐจ๋กœ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.
  • ๋ฌธ์ œ๋ฅผ ๋ชจ๋‘ ํ‘ธ์‹œ๋ฉด ํ”„๋กœ์ ํŠธ์—์„œ Status๋ฅผ In Review๋กœ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.
  • ์ฝ”๋“œ ๊ฒ€ํ† ์ž 1๋ถ„ ์ด์ƒ์œผ๋กœ๋ถ€ํ„ฐ ์Šน์ธ์„ ๋ฐ›์œผ์…จ๋‹ค๋ฉด PR์„ ๋ณ‘ํ•ฉํ•ด์ฃผ์„ธ์š”.

๊ฒ€ํ† ์ž ์ฒดํฌ ๋ฆฌ์ŠคํŠธ

Important

๋ณธ์ธ ๋‹ต์•ˆ ์ œ์ถœ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋‹ค๋ฅธ ๋ถ„ PR ํ•˜๋‚˜ ์ด์ƒ์„ ๋ฐ˜๋“œ์‹œ ๊ฒ€ํ† ๋ฅผ ํ•ด์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค!

  • ๋ฐ”๋กœ ์ด์ „์— ์˜ฌ๋ผ์˜จ PR์— ๋ณธ์ธ์„ ์ฝ”๋“œ ๋ฆฌ๋ทฐ์–ด๋กœ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.
  • ๋ณธ์ธ์ด ๊ฒ€ํ† ํ•ด์•ผํ•˜๋Š” PR์˜ ๋‹ต์•ˆ ์ฝ”๋“œ์— ํ”ผ๋“œ๋ฐฑ์„ ์ฃผ์„ธ์š”.
  • ํ† ์š”์ผ ์ „๊นŒ์ง€ PR์„ ๋ณ‘ํ•ฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์Šน์ธํ•ด์ฃผ์„ธ์š”.

@dalestudy
Copy link
Copy Markdown
Contributor

dalestudy Bot commented May 1, 2026

๐Ÿ“Š sangbeenmoon ๋‹˜์˜ ํ•™์Šต ํ˜„ํ™ฉ

์ด๋ฒˆ ์ฃผ ์ œ์ถœ ๋ฌธ์ œ

๋ฌธ์ œ ๋‚œ์ด๋„ ์œ ํ˜• ๋ถ„์„
linked-list-cycle Easy โš ๏ธ ์œ ํ˜• ๋ถˆ์ผ์น˜

๋ˆ„์  ํ•™์Šต ์š”์•ฝ

  • ํ’€์ดํ•œ ๋ฌธ์ œ: 34 / 75๊ฐœ
  • ์ด๋ฒˆ ์ฃผ ์œ ํ˜• ์ผ์น˜์œจ: 0% (1๋ฌธ์ œ ์ค‘ 0๋ฌธ์ œ ์ผ์น˜)

๋ฌธ์ œ ํ’€์ด ํ˜„ํ™ฉ

์นดํ…Œ๊ณ ๋ฆฌ ์ง„ํ–‰๋„ ์™„๋ฃŒ
Matrix โ– โ– โ– โ– โ– โ–กโ–ก 3 / 4 (Medium 3)
Dynamic Programming โ– โ– โ– โ– โ– โ–กโ–ก 8 / 11 (Easy 1, Medium 7)
Array โ– โ– โ– โ– โ– โ–กโ–ก 7 / 10 (Medium 4, Easy 3)
String โ– โ– โ– โ– โ–กโ–กโ–ก 6 / 10 (Medium 4, Easy 2)
Linked List โ– โ– โ–กโ–กโ–กโ–กโ–ก 2 / 6 (Easy 2)
Heap โ– โ– โ–กโ–กโ–กโ–กโ–ก 1 / 3 (Medium 1)
Tree โ– โ– โ–กโ–กโ–กโ–กโ–ก 4 / 14 (Medium 3, Easy 1)
Graph โ– โ– โ–กโ–กโ–กโ–กโ–ก 2 / 8 (Medium 2)
Binary โ– โ–กโ–กโ–กโ–กโ–กโ–ก 1 / 5 (Easy 1)
Interval โ–กโ–กโ–กโ–กโ–กโ–กโ–ก 0 / 5 โ† ์•„์ง ์‹œ์ž‘ ์•ˆ ํ•จ

๐Ÿค– ์ด ๋Œ“๊ธ€์€ GitHub App์„ ํ†ตํ•ด ์ž๋™์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ”ข API ์‚ฌ์šฉ๋Ÿ‰ (gpt-4.1-nano)
์š”์ฒญ ์ž…๋ ฅ ํ† ํฐ ์ถœ๋ ฅ ํ† ํฐ ํ•ฉ๊ณ„ ๋น„์šฉ
1 316 43 359 $0.000049
2 314 32 346 $0.000044
ํ•ฉ๊ณ„ 630 75 705 $0.000093

Copy link
Copy Markdown
Contributor

@liza0525 liza0525 left a comment

Choose a reason for hiding this comment

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

๊น”๋”ํ•œ ํ’€์ด ์ž˜ ํ™•์ธํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ์ฃผ๋„ ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!

Comment thread linked-list-cycle/sangbeenmoon.py Outdated
MM = 10001
cnt = 0
cur = head
while cur != None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

์†Œ์†Œํ•˜์ง€๋งŒ ํ•ด๋‹น ์กฐ๊ฑด์€ while cur:๋กœ๋„ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค! :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

์˜ค์˜ค ๊น”๋”ํ•˜๋„ค์š” ใ…Žใ…Ž ์งš์–ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!


class Solution:
def hasCycle(self, head: Optional[ListNode]) -> bool:
MM = 10001
Copy link
Copy Markdown
Contributor

@liza0525 liza0525 May 1, 2026

Choose a reason for hiding this comment

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

๋ฌธ์ œ ์กฐ๊ฑด์— node์˜ ๊ฐœ์ˆ˜๊ฐ€ ์ตœ๋Œ€ 10000๊ฐœ๋ผ๊ณ  ๋˜์–ด ์žˆ์–ด์„œ ์ด๋ ‡๊ฒŒ ํ’€์ด๋„ ๊ฐ€๋Šฅํ•˜๊ตฐ์š”๐Ÿ‘€
์ €๋Š” ๋†“์ณค๋˜ ์กฐ๊ฑด์ธ๋ฐ, ๋•๋ถ„์— ํ•œ ๋ฒˆ ๋” ํ™•์ธํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

๐Ÿท๏ธ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ํŒจํ„ด ๋ถ„์„

  • ํŒจํ„ด: Fast & Slow Pointers
  • ์„ค๋ช…: ์ด ์ฝ”๋“œ๋Š” ์ˆœํ™˜ ์—ฌ๋ถ€๋ฅผ ํŒ๋‹จํ•˜๊ธฐ ์œ„ํ•ด ํฌ์ธํ„ฐ๋ฅผ ํ•œ ๋ฒˆ์”ฉ ์ด๋™์‹œํ‚ค๋ฉฐ ์ˆœํ™˜์ด ์กด์žฌํ•˜๋Š”์ง€ ์ฒดํฌํ•˜๋Š” ํŒจํ„ด์œผ๋กœ, Fast & Slow Pointers ๊ธฐ๋ฒ•๊ณผ ์œ ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ“Š ์‹œ๊ฐ„/๊ณต๊ฐ„ ๋ณต์žก๋„ ๋ถ„์„

๋ณต์žก๋„
Time O(n)
Space O(1)

ํ”ผ๋“œ๋ฐฑ: ๋…ธ๋“œ ๋ฐฉ๋ฌธ ์—ฌ๋ถ€๋ฅผ ๊ธฐ๋กํ•˜๋Š” ๋Œ€์‹  ๋ฐฉ๋ฌธ ํšŸ์ˆ˜ ์ œํ•œ์„ ํ†ตํ•ด ์‚ฌ์ดํด์„ ๊ฐ์ง€ํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ, ์ตœ์•…์˜ ๊ฒฝ์šฐ ๋ฆฌ์ŠคํŠธ ๊ธธ์ด๋งŒํผ ์ˆœํšŒํ•˜๋ฉฐ ์‹œ๊ฐ„ ๋ณต์žก๋„๋Š” ์„ ํ˜•์ž…๋‹ˆ๋‹ค. ๊ณต๊ฐ„์€ ์ƒ์ˆ˜์ž…๋‹ˆ๋‹ค.

๊ฐœ์„  ์ œ์•ˆ: ํ˜„์žฌ ๊ตฌํ˜„์ด ์ ์ ˆํ•ด ๋ณด์ž…๋‹ˆ๋‹ค.

๐Ÿ’ก ํ’€์ด์— ์‹œ๊ฐ„/๊ณต๊ฐ„ ๋ณต์žก๋„๋ฅผ ์ฃผ์„์œผ๋กœ ๋‚จ๊ฒจ๋ณด์„ธ์š”!

@sangbeenmoon sangbeenmoon merged commit 8bb21a9 into DaleStudy:main May 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants