Minimum Moves to Clean the Classroom | Deep Dive | Intuition | Leetcode 3568 | codestorywithMIK
codestorywithMIK
0:00 / 0:00
Minimum Moves to Clean the Classroom | Deep Dive | Intuition | Leetcode 3568 | codestorywithMIK
24 272 просмотра · 1 месяц назад
codestorywithMIK
162 тыс. подписчиков
24 272 просмотра · 1 месяц назад
☕ Support codestorywithMIK (No Pressure)
Education here is 100% free and always will be.
If the content helped you and you'd like to support the channel with a coffee:
UPI: imammazhar4@ybl
--------------------------------------------------
Whatsapp Community Link : https://www.whatsapp.com/channel/0029...
Hi Everyone, this is the 192nd video of our Playlist "Array 1D-2D : Popular Interview Problems" by codestorywithMIK.
Today we will be solving a very good problem based problem on BFS in 2D Grid : Minimum Moves to Clean the Classroom | Deep Dive | Intuition | Leetcode 3568 | codestorywithMIK
Problem Name : Minimum Moves to Clean the Classroom | Deep Dive | Intuition | Leetcode 3568 | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie...
Leetcode Link : https://leetcode.com/problems/minimum...
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 | Leetcode 212 | Detailed |...
Difference Array Technique: Concepts & Qns : • Introduction | What | How | Difference Arr...
My Line Sweep Technique Playlist : • Introduction | What | Why | Line Sweep Tec...
Meet In The Middle : Concepts & Qns : • Introduction | Meet In The Middle (MITM) |...
Binary Lifting : Concepts & Questions : • Introduction | Binary Lifting | DP On Tree...
Top K from Sorted Structures Pattern : Concepts & Questions : • Introduction | Top K from Sorted Structure...
Small Java Dopamine Videos : • Small Java Dopamine Videos | codestorywithMIK
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Intervie...
Instagram : / codestorywithmik
Facebook : / 100090524295846
Twitter : / cswithmik
Subscribe to my channel : / @codestorywithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Video Summary :
The most important part is realizing your "situation" isn't just where you stand , it's where you stand plus how much energy you have plus which litter you've already grabbed. Plain BFS on (row, col) fails because it visits each cell once, so it can't revisit a cell with more energy or with new litter progress , both of which are often essential. Energy must be in the state because the same cell reached with 5 vs 1 energy has totally different futures; litter must be tracked as a bitmask (not a count) because the remaining work depends on which pieces are left, not how many. With the full state (row, col, energy, mask), ordinary BFS layers correctly give the minimum moves, since every move costs exactly 1.
✨ Timelines✨
00:00 Introduction
00:08 Motivation
00:17 Problem Explanation
04:23 Thought Process - Naive Approach
09:44 Why Normal BFS Fails ?
20:53 Important Catch
26:24 Using bit mask
33:02 Summary Story Points
35:57 Story To Code
52:37 Coding it up
#MIK #mik #Mik
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #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 #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #dsa #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