Skip to content

Instantly share code, notes, and snippets.

View aasthagupta30's full-sized avatar
🏠
Working from home

AASTHA GUPTA aasthagupta30

🏠
Working from home
  • DELHI
View GitHub Profile
@aasthagupta30
aasthagupta30 / SET_MATRIX_ZEROES.py
Created April 2, 2022 16:28
Striver's SDE Sheet (day-1) [LEETCODE]
class Solution:
def setZeroes(self, matrix: List[List[int]]) -> None:
row=len(matrix)
col=len(matrix[0])
col1=1
for i in range(row):
if matrix[i][0]==0:
col1=0
for j in range(1,col):
if matrix[i][j]==0: