-
☆[Leetcode] 542. 01 Matrix {Day 9 BFS / DFS} (In Python)[Python] 파이썬/Leetcode_14Days plan to crack Algo 2021. 12. 3. 20:42
코드들은 https://github.com/Eastar-DS/Python/tree/main/14%20Days%20Study%20Plan%20to%20CrackAlgo에도 있습니다
진짜 전 난리를 쳤다 ㅋㅋ output = [[-1]*3]*3 을 하면 ([-1]*3을 array라고 하자)[array,array,array]로 인식이 된다는걸 생각하지 못했다. output[1][1] = 0으로 바꾸면 가운데만 바뀌는게아니라 세개의 어레이에서 모두 바뀌어버리는 마술! 이것때문에 하루죙일 풀었다 ㅠㅠ
'[Python] 파이썬 > Leetcode_14Days plan to crack Algo' 카테고리의 다른 글
Day10은 DataStructure과 문제가 겹쳐요! (0) 2021.12.03 ☆[Leetcode] 994. Rotting Oranges {Day 9 BFS / DFS} (In Python) (0) 2021.12.03 [Leetcode] 116. Populating Next Right Pointers in Each Node {Day 8 BFS / DFS} (In Python) (0) 2021.12.02 [Leetcode] 617. Merge Two Binary Trees {Day 8 BFS / DFS} (In Python) (0) 2021.12.02 [Leetcode] 695. Max Area of Island {Day 7 BFS / DFS} (In Python) (0) 2021.12.01