🧑🏻💻 LeetCode Medium Collections II - 11 Problems
0054. Spiral Matrix / 0739. Daily Temperaturesclass Solution: def spiralOrder(self, matrix: List[List[int]]) -> List[int]: e,s,w,n = [0,1], [1,0], [0,-1], [-1,0] output = [] rows, cols = len(matrix), len(matrix[0]) visited = [[False] * cols for _ in range(rows)] cnt = 0 x, y = 0,0 dirs = [e,s,w,n] dir_i = 0 while True: ..
LeetCode Problems/Medium
2024. 10. 31.