
73. Set Matrix Zeroes
·
Algorithm
Set Matrix Zeroes - 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 2차원 배열이 주어진다. 2차원 배열에서 (row, col)에 해당하는 값이 0이라면 해당 row와 col을 배열 끝까지 0의 값으로 채우는 문제다. 1. 구현 from typing import * def set_row(board, row): board[row] = [1] * len(board[row]) def set_col(board, col): for row in range(l..