Skip to content
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

Merged
merged 1 commit into from
Mar 4, 2024
Merged

[week-06-implementation] 1966, 2239 #37

merged 1 commit into from
Mar 4, 2024

Conversation

leGit-y
Copy link
Contributor

@leGit-y leGit-y commented Mar 3, 2024

while q:
nq = q.popleft()
ni = index.popleft()
if q and nq < max(q):
Copy link
Contributor

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):
Copy link
Contributor

Choose a reason for hiding this comment

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

column, row, square 별로 나누니까 더 좋은 거 같아요!

Copy link
Contributor

@wonkyDD wonkyDD left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Comment on lines +38 to +43
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
Copy link
Member

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()

Copy link
Member

Choose a reason for hiding this comment

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

LGTM😀👍🏻

@clean2001 clean2001 merged commit 860096d into main Mar 4, 2024
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.

[week-06-implementation] 1966, 2239
4 participants