[Python] 파이썬/Leetcode_14Days plan to crack Algo
-
[Leetcode] 784. Letter Case Permutation {Day 11 11 Recursion / Backtracking} (In Python)[Python] 파이썬/Leetcode_14Days plan to crack Algo 2021. 12. 8. 01:38
코드들은 https://github.com/Eastar-DS/Python/tree/main/14%20Days%20Study%20Plan%20to%20CrackAlgo에도 있습니다 알파벳이랑 숫자가 뒤섞여있는 스트링에서 알파벳을 대소문자로 바꾼경우의수를 가져와야함. isalpha()라는 함수와 swapcase라는 함수를 알게됨.
-
[Leetcode] 77. Combinations {Day 11 11 Recursion / Backtracking} (In Python)[Python] 파이썬/Leetcode_14Days plan to crack Algo 2021. 12. 8. 01:33
코드들은 https://github.com/Eastar-DS/Python/tree/main/14%20Days%20Study%20Plan%20to%20CrackAlgo에도 있습니다 itertools의 combination을 알게된 문제... 점점 혼자는 풀기 어려운문제가 많아서 힘들다 ㅠㅠ
-
☆[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으로 바꾸면 가운데만 바뀌는게아니라 세개의 어레이에서 모두 바뀌어버리는 마술! 이것때문에 하루죙일 풀었다 ㅠㅠ
-
[Leetcode] 116. Populating Next Right Pointers in Each Node {Day 8 BFS / DFS} (In Python)[Python] 파이썬/Leetcode_14Days plan to crack Algo 2021. 12. 2. 00:14
코드들은 https://github.com/Eastar-DS/Python/tree/main/14%20Days%20Study%20Plan%20to%20CrackAlgo에도 있습니다 생각 엄청하게 해준문제. 결국 디스커스보고 힌트받아서 풀었음. 1. 레프트가 있으면 레프트의 넥스트는 라이트. 2. 넥스트가 있으면 라이트의 넥스트는 넥스트의 레프트. 3. 넥스트가 없으면 저장해둔곳의 레프트로가서 반복.