Skip to content

[soobing] WEEK09 Solutions#1525

Merged
SamTheKorean merged 5 commits intoDaleStudy:mainfrom
soobing:week9
Jun 2, 2025
Merged

[soobing] WEEK09 Solutions#1525
SamTheKorean merged 5 commits intoDaleStudy:mainfrom
soobing:week9

Conversation

@soobing
Copy link
Contributor

@soobing soobing commented May 26, 2025

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

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

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

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

Important

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

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

Copy link
Contributor

@clara-shin clara-shin left a comment

Choose a reason for hiding this comment

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

์ด๋ฒˆ ์ฃผ๋„ ๊ณ ์ƒ ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค! ๋‹ค์Œ์ฃผ๋„ ํ™”์ดํŒ…์ด์—์š”!!

* - ๋งค index๋งˆ๋‹ค, ํ˜„์žฌ๊นŒ์ง€ max ๊ณฑ, min ๊ณฑ์„ ์ฐพ๊ณ  ์ตœ๋Œ€๊ฐ’์„ ๊ฐฑ์‹ 
*/
function maxProduct(nums: number[]): number {
let maxSoFar = nums[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

๋ชจ๋“  ๊ฒฝ์šฐ๋ฅผ ํ•œ ๋ฒˆ์— ๊ณ ๋ คํ•˜๋Š” ๊น”๋”ํ•œ ์ ‘๊ทผ์ž…๋‹ˆ๋‹ค ๐Ÿ‘
์ดˆ๊ธฐ์— ๋นˆ ๋ฐฐ์—ด ์˜ˆ์™ธ์ฒ˜๋ฆฌ๊ฐ€ ์žˆ์œผ๋ฉด ๋” ์ข‹์„๊ฒƒ ๊ฐ™์•„์š”!

* - ๋น„๊ฐ€ ๋‚ด๋ ธ์„ ๋•Œ, ํƒœํ‰์–‘๊ณผ ๋Œ€์„œ์–‘ ๋ชจ๋‘๋กœ ๋ฌผ์ด ํ๋ฅผ ์ˆ˜ ์žˆ๋Š” ์ง€์ ์„ ์ฐพ์•„ ๋ฐ˜ํ™˜ํ•˜๋Š” ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค.
* ์•„์ด๋””์–ด
* 1) BFS/DFS
* - ๊ฐ ๋ฐ”๋‹ค์—์„œ ์—ญ๋ฐฉํ–ฅ์œผ๋กœ ๋ฌผ์ด ๋„๋‹ฌํ•  ์ˆ˜ ์žˆ๋Š” ์…€์„ ํƒ์ƒ‰ํ•œ ํ›„, ๋‘ ๋ฐ”๋‹ค ๋ชจ๋‘์— ๋„๋‹ฌ ๊ฐ€๋Šฅํ•œ ์…€์˜ ๊ต์ง‘ํ•ฉ ๊ตฌํ•˜๊ธฐ
Copy link
Contributor

@YoungSeok-Choi YoungSeok-Choi May 31, 2025

Choose a reason for hiding this comment

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

์•ˆ๋…•ํ•˜์„ธ์š”!
์š” ๋ฌธ์ œ๋ฅผ ๋ฐ˜๋Œ€๋กœ ๋ฐ”๋‹ค์—์„œ ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์ ‘๊ทผํ•ด ํ’€์ดํ•ด ๋ณด์…จ๊ตฐ์š”...!

์ €๋Š” ๋ชจ๋“  ์…€์— ๋Œ€ํ•ด์„œ ์–‘ ๋ฐ”๋‹ค๋กœ ๋ชจ๋‘ ๋‹ฟ์„ ์ˆ˜ ์žˆ๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ํŒ๋‹จํ•˜๋ ค๊ณ  ๋ชจ๋“  ์…€ * 2 ๋ฒˆ์”ฉ dfs ๋ฅผ ๋Œ๋ ธ์—ˆ๋Š”๋ฐ
์ด๋Ÿฐ ์•„์ด๋””์–ด๋ฅผ ๋– ์˜ฌ๋ฆฌ๊ฒŒ ๋œ ๋ญ๋ž„๊นŒ์š” ์ƒ๊ฐ์˜ ๊ณผ์ •..? ๋ฅผ ๊ฐ„๋‹จํžˆ ์„ค๋ช…ํ•ด์ฃผ์‹ค ์ˆ˜ ์žˆ์„๊นŒ์š”!?

(์–ด๋–ค ๋ถ€๋ถ„์„ ๋ณด๊ณ  ์ด๋ ‡๊ฒŒ ์ ‘๊ทผํ•ด๋ณผ ์ˆ˜๋„ ์žˆ๊ฒ ๋‹ค.. ๋ผ๋Š” ์‹์˜ ๋А๋‚Œ์ž…๋‹ˆ๋‹ค ๐Ÿคฃ ๋ญ”๊ฐ€ ์ฝ•์ฐ์–ด์„œ ์„ค๋ช…์„ ๋ชปํ•˜๊ฒ ๋„ค์š”ใ… )

+) ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ๋ฅผ ํ’€์ดํ•˜์‹ค ๋•Œ ํ’€์ด ์•„์ด๋””์–ด๋ฅผ ๋– ์˜ฌ๋ฆฌ์‹œ๋Š” ํฌ์ธํŠธ? ๊ฐ™์€๊ฒƒ๋„ ๋งŒ์•ฝ ์žˆ์œผ์‹œ๋‹ค๋ฉด ์•Œ๋ ค์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํžˆ ๋ฐฐ์›Œ๊ฐ€๊ฒ ์Šต๋‹ˆ๋‹ค!

@SamTheKorean SamTheKorean merged commit 3f22d42 into DaleStudy:main Jun 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants