Loading...
「ツール」は右上に移動しました。
利用したサーバー: natural-voltaic-titanium
256いいね 4046回再生

Set Matrix Zeroes | Multiple Approaches | Leetcode 73 | codestorywithMIK

Whatsapp Community Link : www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A

Hi Everyone, this is the 150th video of our Playlist "Arrays 1D/2D : Popular Interview Problems".
Now we will be solving a good 2D array problem - Set Matrix Zeroes | Multiple Approaches | Leetcode 73 | codestorywithMIK

We will solve it using multiple approaches starting from brute force to optimal.

Problem Name : Set Matrix Zeroes | Multiple Approaches | Leetcode 73 | codestorywithMIK
Company Tags : will update later
Code Github(C++ & JAVA) - github.com/MAZHARMIK/Interview_DS_Algo/blob/master…
Leetcode Link : leetcode.com/problems/set-matrix-zeroes/descriptio…


My DP Concepts Playlist :    • Roadmap for DP | How to Start DP ? | Topic...  
My Graph Concepts Playlist :    • Graph Concepts & Qns - 1 : Graph will no m...  
My Segment Tree Concepts Playlist :    • Segment Tree | Introduction | Basics | Bui...  
My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And Ques...  
Trie Playlist -    • Word Search II (Google, Amazon, Meta, Micr...  
Difference Array Technique: Concepts & Qns :    • Introduction | What | How | Difference Arr...  
My GitHub Repo for interview preparation : github.com/MAZHARMIK/Interview_DS_Algo
Instagram : www.instagram.com/codestorywithmik/
Facebook : www.facebook.com/people/codestorywithmik/100090524…
Twitter : twitter.com/CSwithMIK
Subscribe to my channel :    / @codestorywithmik  

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝


Video Summary :
🧠 Approach-1 (Using extra space of m×n)
Create a temporary copy of the original matrix.
For every 0 found, set the corresponding row and column to 0 in the copy.
Finally, copy the modified matrix back—simple but space-inefficient.

🧠 Approach-2 (Using m+n extra space)
Use two boolean arrays to mark rows and columns that should be zeroed.
Traverse the matrix again and zero out marked rows and columns.
More efficient in space than Approach-1, but still not optimal.

🧠 Approach-3 (In-place constant space)
Use the first row and first column of the matrix as markers instead of extra space.
After marking, iterate again and zero out necessary cells.
Efficient in both time and space; best approach for this problem.


✨ Timelines✨
00:00 - Introduction
0:12 - Motivation
0:28 - Problem Explanation
1:11 - Brute Force Approach
4:32 - Better Approach
10:03 - Optimal Constant Space Approach
19:54 - Corner Case
28:10 - Coding Brute Force
30:31 - Coding Better Approach
32:00 - Coding Optimal Approach

#MIK #mik #Mik
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #coding #programming #100daysofcode #developers #techjobs #datastructures #algorithms #webdevelopment #softwareengineering #computerscience #pythoncoding #codinglife #coderlife #javascript #datascience #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #hindi #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobseekers #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #videomarketing #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik

コメント