douglas-cerrato / LeetCode-75

This will just be a folder of the Blind LeetCode 75 problem challenge located here: https://leetcode.com/discuss/general-discussion/460599/blind-75-leetcode-questions
1 stars 0 forks source link

Set Matrix Zeroes #3

Open douglas-cerrato opened 7 months ago

douglas-cerrato commented 7 months ago

Issue: Set Matrix Zeroes


Overview

We're diving into LeetCode Problem #73: Set Matrix Zeroes. This problem tasks us with modifying an integer matrix, setting entire rows and columns to zeros if any cell contains a zero.

Problem Description

Given an integer matrix matrix of dimensions m x n, if an element is 0, we need to set its entire row and column to 0's.

Task

Implement an algorithm that modifies the matrix in-place, ensuring that any cell containing a zero results in its entire row and column being set to zeros.

douglas-cerrato commented 7 months ago

Completed LeetCode problem successfully with commit https://github.com/douglas-cerrato/LeetCode-75/commit/29b7f09278f8c2dcaeab214b5f2bdc2547798606

douglas-cerrato commented 7 months ago

Merged to main https://github.com/douglas-cerrato/LeetCode-75/commit/85ac879b192ca6de6c2f34f6927a0d27a3bd08f9. Closing issue

douglas-cerrato commented 7 months ago

Reopening this issue


After looking into the runtime throughout all the test case it goes through on Leetcode, it seems that my code for this problem is running at the back percentile of the graph of all submitted answers and their runtime. Going to go back to the drawing board to make this solution faster