leetcode.com/problems/valid-sudoku/
Valid Sudoku - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
스도쿠에 관한 문제.
스도쿠는 꼭 기억해놓는게 좋을것 같다.
(예전에도 풀었었는데 진짜 학습력 제로인듯)
gist.github.com/mumunuu/493b471b6b55e8b9a21c854889ac79b0
algorithm(leetcode) Valid Sudoku
algorithm(leetcode) Valid Sudoku. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
2중 for loop를 수행할 때,
작은 네모의 인덱스를 파악하는 방법은
for i := 0; i < 9; i++ {
for j := 0; j < 9; j++ {
b := i/3*3 + j/3
}
이 식을 통해서 현재 어떤 인덱스에 속해있는지 알 수 있다.
'hello world > algorithm' 카테고리의 다른 글
오늘의 알고리즘: Reverse String (344. LeetCode) (0) | 2021.01.20 |
---|---|
오늘의 알고리즘: Rotate Image (48. LeetCode) (0) | 2021.01.20 |
오늘의 알고리즘: Valid Sudoku (36. LeetCode) (0) | 2021.01.18 |
오늘의 알고리즘: Two Sum (1. LeetCode) (0) | 2021.01.15 |
오늘의 알고리즘: Plus One (283. LeetCode) (0) | 2021.01.15 |
오늘의 알고리즘: Plus One (66. LeetCode) (0) | 2021.01.15 |