- Today
- Total
목록Problem Solving (2)
코기판
Problem : https://leetcode.com/problems/running-sum-of-1d-array/ Running Sum of 1d Array - 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 My solution : class Solution: def runningSum(self, A): ans = [A[0]] * len(A) for idx in range(1, len(A)): ans[idx] = ans[idx - 1] + A[idx] retu..
Problem Link : https://leetcode.com/problems/transpose-matrix/ Transpose Matrix - 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 My Solution : class Solution: def transpose(self, matrix: List[List[int]]) -> List[List[int]]: m = len(matrix) n = len(matrix[0]) new_mat = [] for y_idx..