package
0.0.0-20241209140624-9fce2a725d55
Repository: https://github.com/elven9/my-leetcode.git
Documentation: pkg.go.dev
# README
Set Matrix Zeroes
Solution Idx | Time Complexity | Space Complexity | Comment |
---|---|---|---|
1 | O(mn) | O(m+n) | Naive sol. scan first and zero out all rows and cols |
2 | O(mn) | O(1) | Constant space. Store signature in the first row and first column |