Skip to content

Conversation

@UiHyeon
Copy link
Collaborator

@UiHyeon UiHyeon commented Jun 22, 2021

๐Ÿ“˜ ๊ตฌํ˜„

๊ด„ํ˜ธํšŒ์ „ ๋ฌธ์ œ๋ฅผ ํ’€๋•Œ๋Š” ์Šคํ„ฐ๋””์— ์ฃผ์–ด์ง„ ๋ฌธ์ œ์™€ ๋‹ค๋ฅธ ๋น„์Šทํ•œ ๊ด„ํ˜ธ๋ฌธ์ œ๋ฅผ ํ’€์—ˆ๋˜ ๊ฒฝํ—˜์œผ๋กœ ๋ฌธ์ œ๋ฅผ ์ ‘๊ทผํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ด„ํ˜ธ์˜ ์˜ฌ๋ฐ”๋ฆ„ ์—ฌ๋ถ€๋ฅผ ํŒ๋ณ„ํ•˜๋Š” ๊ฒƒ์—๋Š” stack์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ํŽธ๋ฆฌํ•จ์„ ๋‹ค์‹œ ์•Œ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์š”์ฆ˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ๋ฅผ ํ’€๋•Œ ์ฝ”๋“œ์˜ ๊ธธ์ด๊ฐ€ ๊ธธ์–ด์ง€๊ฑฐ๋‚˜ ๊นŠ์ด๊ฐ€ ๊นŠ์–ด์งˆ๋•Œ ์ฝ”๋“œ ์ˆ˜์ •์˜ ์–ด๋ ค์›€์„ ๊ฒช์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ๋ฌธ์ œ์—์„œ๋Š” ๊ทธ ์–ด๋ ค์›€์„ ํ•ด๊ฒฐํ•˜๊ณ ์ž ์ผ๋ถ€ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋กœ์ง์„ ํ•จ์ˆ˜ํ™” ์‹œ์ผœ ๋ถ„๋ฆฌํ•ด ์ฝ”๋“œ์˜ ๋ณต์žกํ•จ์„ ๊ฐ์†Œ์‹œํ‚ค๊ณ  ๊ฐ€๋…์„ฑ์„ ์˜ฌ๋ฆฌ๋Š” ํ˜•์‹์œผ๋กœ ๊ตฌํ˜„ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

ํ–‰๋ ฌ ํ…Œ๋‘๋ฆฌ ํšŒ์ „ ๋ฌธ์ œ๋Š” ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์—์„œ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ๋ฅผ ์‘์‹œํ•  ๋‹น์‹œ ๊ธฐ์ถœ๋œ ๋ฌธ์ œ์˜€๊ณ  ํ’€์ง€ ๋ชปํ–ˆ๋˜ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋Š” ํ–‰๋ ฌ์˜ row์™€ column์„ ํ—ท๊ฐˆ๋ฆฌ์ง€ ์•Š๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ํฐ ์ค‘์‹ฌ์ด ๋˜๋Š” ๊ฒƒ ๊ฐ™์•˜์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฌธ์ œ๋ฅผ ํ’€๋ฉด์„œ ์ฒ˜์Œ ๊ตฌํ˜„ ๋ฐฉ์‹์„ ๋– ์˜ฌ๋ฆด ๋•Œ '์ฃผ์–ด์ง„ ์ˆœ์„œ๋กœ ํ–‰๋ ฌ์„ ๋Œ๋ฆฌ๋ฉด์„œ ๊ฐ’์„ ๋ฐ”๊ฟ”์ฃผ๋ฉด ๋˜๊ตฌ๋‚˜'๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๋Š”๋ฐ ์ด๋ ‡๊ฒŒ ์ƒ ์šฐ ํ•˜ ์ขŒ(์‹œ๊ณ„๋ฐฉํ–ฅ)์œผ๋กœ ์ด๋™์„ ํ•˜๊ฒŒ ๋˜๋ฉด ์›ํ•˜๋Š” ๋Œ€๋กœ ์ˆซ์ž์˜ ์ด๋™์ด ์ด๋ค„์งˆ ์ˆ˜๊ฐ€ ์—†๋Š” ๊ตฌ์กฐ์˜€์Šต๋‹ˆ๋‹ค. ์ˆซ์ž๋Š” ์‹œ๊ณ„๋ฐฉํ–ฅ์œผ๋กœ ์ด๋™ํ•˜์ง€๋ง‰ ์ด ์›€์ง์ž„์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋กœ์ง์€ ๋ฐ˜์‹œ๊ณ„๋ฐฉํ–ฅ์œผ๋กœ ์„ค๊ณ„๋ฅผ ํ•˜๊ณ  ๊ตฌํ˜„์„ ํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋‚ด์šฉ์„ ์ดํ•ดํ•˜๊ธฐ๊นŒ์ง€ ์˜ค๋ž˜ ๊ฑธ๋ ธ๊ณ  ์–ด๋ ค์› ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์— ๋น„์Šทํ•œ ์œ ํ˜•์ด ๋‚˜์˜จ๋‹ค๋ฉด ๋” ์ˆ˜์›”ํ•˜๊ฒŒ ํ’€ ์ˆ˜ ์žˆ์„๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๐Ÿ’ฌ ํ›„๊ธฐ

๊ด„ํ˜ธํšŒ์ „์—์„  ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ์ด ๊ด„ํ˜ธ๋“ค์˜ ๋‚˜์—ด์ด ์˜ฌ๋ฐ”๋ฅธ ๊ด„ํ˜ธ์˜ ๋‚˜์—ด์ธ์ง€๋ฅผ ํŒ๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š”์ง€์— ๋Œ€ํ•œ ๋ฐฉ๋ฒ•์„ ๊ณ ๋ฏผํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ด„ํ˜ธ๊ฐ€ ์—ด๋ฆฌ๋Š” ๋ฌธ์ž ์ดํ›„ ํ•ด๋‹นํ•˜๋Š” ์ง์˜ ๊ด„ํ˜ธ ๋‹ซํž˜ ๋ฌธ์ž๊ฐ€ ์˜ค์ง€ ์•Š์œผ๋ฉด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š๋Š” ํ˜•์‹์œผ๋กœ ํŒ๋ณ„์„ ํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

ํ–‰๋ ฌ ํ…Œ๋‘๋ฆฌ ํšŒ์ „ ๋ฌธ์ œ๋Š” ์œ„์— ๋ฌธ์ œ ๊ตฌํ˜„ ์„ค๋ช…์—์„œ์™€ ๊ฐ™์ด ์ˆซ์ž์˜ ์ด๋™์€ ์‹œ๊ณ„ , ์ด๋™์„ ์œ„ํ•œ ์›€์ง์ž„ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋กœ์ง์€ ๋ฐ˜์‹œ๊ณ„ ์ฒ˜๋Ÿผ ์ƒ๊ฐ์„ ํ•ด์•ผํ•จ์ด ์–ด๋ ค์› ์Šต๋‹ˆ๋‹ค.

@auto-assign auto-assign bot requested a review from Do-ho June 22, 2021 07:30
Copy link
Member

@Do-ho Do-ho left a comment

Choose a reason for hiding this comment

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

๋” ์ข‹์€ ์ฝ”๋“œ๊ฐ€ ๋˜์–ด๊ฐ€๊ณ  ์žˆ๊ตฐ์š” ใ…Žใ…Žใ…Ž ์ข‹์Šต๋‹ˆ๋‹ค :)

Comment on lines 3 to 12
graph = []
num = 1
#ํ–‰๋ ฌ ์ƒ์„ฑ
for i in range(rows):
temp = []
for j in range(columns):
temp.append(num)
num += 1

graph.append(temp)
Copy link
Member

Choose a reason for hiding this comment

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

๋งŒ๋“ ๋‹ค๋ฉด ํ•œ์ค„๋กœ๋„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ์š”?

Copy link
Member

Choose a reason for hiding this comment

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

์ฝ”๋“œ๊ฐ€ ์งง์•„๋ณด์ด๋Š” ํšจ๊ณผ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ๊ฒ ๋„ค์š”

Comment on lines 17 to 18
slave = graph[base_r-1][end_c-1]
mini = slave
Copy link
Member

Choose a reason for hiding this comment

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

slave๋Š” ๋ฌด์Šจ ์˜๋ฏธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‚˜์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

์•„ ์ด๊ฑด ์ˆซ์ž๋ฅผ ์ด๋™ํ•˜๋‹ค ๋ณด๋ฉด ์ฒ˜์Œ ์ด๋™์‹œํ‚จ ์ˆซ์ž๊ฐ€ ํšŒ์ „๋ฌธ์—์„œ ์ œ์™ธ๋˜๋Š”๋ฐ ์ด ์ˆซ์ž๋ฅผ ๋งˆ์ง€๋ง‰์ด๋™ ์ž๋ฆฌ์— ๋‹ค์‹œ ๋ผ์›Œ๋„ฃ์–ด์ค˜์•ผํ•ฉ๋‹ˆ๋‹ค . ๊ทธ๋ž˜์„œ slave๋ผ๋Š” ๋ณ€์ˆ˜๋กœ ๊ฐ’์„ ์ €์žฅํ–ˆ์Šต๋‹ˆ๋‹ค.

Copy link
Member

Choose a reason for hiding this comment

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

๋ณ€์ˆ˜๋ช…์ด ์ฒ˜์Œ ๋ณด๋Š” ์‚ฌ๋žŒ์ด ์•Œ์•„๋ณด๊ธฐ ์–ด๋ ค์›Œ์š” ใ… ใ…  ๋” ๊ฐ€๋…์„ฑ ์žˆ๋Š” ๋ณ€์ˆ˜๋ช…์„ ์จ๋ณด์ž์š”~~!

Copy link
Collaborator Author

@UiHyeon UiHyeon Jun 23, 2021

Choose a reason for hiding this comment

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

์•„ใ…‹ใ…‹ใ…‹ ๋งž์Šต๋‹ˆ๋‹ค ใ…‹ใ…‹ใ…‹ ๊ฐœ๊ทธ ์†Œ์žฌ๋กœ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ ๋ณ€๊ฒฝํ• ๊ฒŒ์š” XD

@@ -0,0 +1,36 @@
from collections import deque

def right(deq):
Copy link
Member

Choose a reason for hiding this comment

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

right๋„ ์ข‹์ง€๋งŒ string์ด ๊ด„ํ˜ธ ๊ฒ€์‚ฌ๋กœ ๋ถ€ํ„ฐ validํ•œ์ง€๋ฅผ ํ™•์ธํ•˜๋Š” ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— isValidBracket๊ณผ ๊ฐ™์ด is๋ฅผ ์•ž์— ๋ถ™์—ฌ์ฃผ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š”.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

์ข‹์€ ํ•จ์ˆ˜ ๋ช…๋ช…๋ฒ• ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค!

Comment on lines 6 to 15
if check == '(' or check == '{' or check == '[':
stack.append(check)
if stack:
if check == ')' and stack.pop() != '(':
return False
if check == '}' and stack.pop() != '{':
return False
if check == ']' and stack.pop() != '[':
return False
else: return False
Copy link
Member

Choose a reason for hiding this comment

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

์ด๋ถ€๋ถ„์€ ์ •๊ทœํ‘œํ˜„์‹์œผ๋กœ๋„ ํ•œ๋ฒˆ ์งœ๋ณด๊ธฐ๋ฅผ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค ใ…Žใ…Ž ๋ฌผ๋ก  ์งœ๋Š” ์†๋„๋Š” if ๋ฌธ์„ ์“ฐ๋Š”๊ฒŒ ๋น ๋ฅด๊ฒ ์ฃ ?

@github-actions github-actions bot requested a review from Do-ho June 23, 2021 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants