-
Notifications
You must be signed in to change notification settings - Fork 1
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
[week-06-implementation] 1966, 2239 #37
Conversation
while q: | ||
nq = q.popleft() | ||
ni = index.popleft() | ||
if q and nq < max(q): |
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.
python에서 큐에 대해 max가 되는군요 ..! 😲
@@ -0,0 +1,60 @@ | |||
def column_valid(row,value): |
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.
column, row, square 별로 나누니까 더 좋은 거 같아요!
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.
LGTM 👍
if column_valid(r,i) and row_valid(c,i) and square_valid(r,c,i): | ||
sudoku[r][c] = i | ||
check = dfs(cnt + 1) | ||
if check: | ||
return True | ||
sudoku[r][c] = 0 |
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.
column, row, square 함수로 나누니 이 부분이 확실히 깔끔한 것 같아요!
for j in range(9): | ||
print(sudoku[i][j], end='') | ||
print() | ||
|
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.
LGTM😀👍🏻
closes #29
1966. 프린터 큐
2239. 스도쿠