-
Notifications
You must be signed in to change notification settings - Fork 0
Solve week3 problems #9
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
base: main
Are you sure you want to change the base?
Conversation
Do-ho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ ์ข์ ์ฝ๋๊ฐ ๋์ด๊ฐ๊ณ ์๊ตฐ์ ใ ใ ใ ์ข์ต๋๋ค :)
UiHyeon/week_3/array_turn.py
Outdated
| graph = [] | ||
| num = 1 | ||
| #ํ๋ ฌ ์์ฑ | ||
| for i in range(rows): | ||
| temp = [] | ||
| for j in range(columns): | ||
| temp.append(num) | ||
| num += 1 | ||
|
|
||
| graph.append(temp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ง๋ ๋ค๋ฉด ํ์ค๋ก๋ ๋ง๋ค ์ ์์ง ์์๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฝ๋๊ฐ ์งง์๋ณด์ด๋ ํจ๊ณผ๋ฅผ ์ป์ ์ ์๊ฒ ๋ค์
UiHyeon/week_3/array_turn.py
Outdated
| slave = graph[base_r-1][end_c-1] | ||
| mini = slave |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slave๋ ๋ฌด์จ ์๋ฏธ๋ฅผ ๊ฐ์ง๊ณ ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ด๊ฑด ์ซ์๋ฅผ ์ด๋ํ๋ค ๋ณด๋ฉด ์ฒ์ ์ด๋์ํจ ์ซ์๊ฐ ํ์ ๋ฌธ์์ ์ ์ธ๋๋๋ฐ ์ด ์ซ์๋ฅผ ๋ง์ง๋ง์ด๋ ์๋ฆฌ์ ๋ค์ ๋ผ์๋ฃ์ด์ค์ผํฉ๋๋ค . ๊ทธ๋์ slave๋ผ๋ ๋ณ์๋ก ๊ฐ์ ์ ์ฅํ์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ณ์๋ช ์ด ์ฒ์ ๋ณด๋ ์ฌ๋์ด ์์๋ณด๊ธฐ ์ด๋ ค์์ ใ ใ ๋ ๊ฐ๋ ์ฑ ์๋ ๋ณ์๋ช ์ ์จ๋ณด์์~~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ใ ใ ใ ๋ง์ต๋๋ค ใ ใ ใ ๊ฐ๊ทธ ์์ฌ๋ก ์ฌ์ฉํ๋๋ฐ ๋ณ๊ฒฝํ ๊ฒ์ XD
UiHyeon/week_3/bracket_turn.py
Outdated
| @@ -0,0 +1,36 @@ | |||
| from collections import deque | |||
|
|
|||
| def right(deq): | |||
There was a problem hiding this comment.
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๋ฅผ ์์ ๋ถ์ฌ์ฃผ๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ข์ ํจ์ ๋ช ๋ช ๋ฒ ๋ฐฐ์๊ฐ๋๋ค!
UiHyeon/week_3/bracket_turn.py
Outdated
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๋ถ๋ถ์ ์ ๊ทํํ์์ผ๋ก๋ ํ๋ฒ ์ง๋ณด๊ธฐ๋ฅผ ์ถ์ฒ๋๋ฆฝ๋๋ค ใ ใ ๋ฌผ๋ก ์ง๋ ์๋๋ if ๋ฌธ์ ์ฐ๋๊ฒ ๋น ๋ฅด๊ฒ ์ฃ ?
๐ ๊ตฌํ
๐ฌ ํ๊ธฐ