Загрузка...

Minimum Recolors to Get K Consecutive Black Blocks | 2 Approaches | Leetcode 2379 | codestorywithMIK

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

Hi Everyone, this is the 73rd video of our Playlist "Leetcode Easy : Popular Interview Problems".
Now we will be solving a good practice Sliding Window problem - Minimum Recolors to Get K Consecutive Black Blocks | 2 Detailed Approaches | Leetcode 2379 | codestorywithMIK

We will solve it using 2 Approaches : Brute Force and then Sliding Window using Khandani Template

Problem Name : Minimum Recolors to Get K Consecutive Black Blocks | 2 Detailed Approaches | Leetcode 2379 | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Sliding%20Window/Leetcode%20Easy/Minimum%20Recolors%20to%20Get%20K%20Consecutive%20Black%20Blocks.cpp
Leetcode Link : https://leetcode.com/problems/minimum-recolors-to-get-k-consecutive-black-blocks
My DP Concepts Playlist : https://youtu.be/7eLMOE1jnls
My Graph Concepts Playlist : https://youtu.be/5JGiZnr6B5w
My Segment Tree Concepts Playlist : https://www.youtube.com/watch?v=k99r1A7krcY&list=PLpIkg8OmuX-K1qUIQToCllUO0UIKXt8dB
My Recursion Concepts Playlist : https://www.youtube.com/watch?v=pfb1Zduesi8&list=PLpIkg8OmuX-IBcXsfITH5ql0Lqci1MYPM
Trie Playlist - https://www.youtube.com/watch?v=DMP2bqW6URA&list=PLpIkg8OmuX-I99uuP2BZOz4mI_lms4gVG
Difference Array Technique: Concepts & Qns : https://www.youtube.com/watch?v=ZHNVmtm08WY&list=PLpIkg8OmuX-Kqkb8DqDe_4-Tiav6ilS_L
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Subscribe to my channel : https://www.youtube.com/@codestorywithMIK

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Video Summary :
Approach-1 (Brute Force):
This approach checks every possible contiguous subarray of length k and counts the number of 'W' characters in each. The minimum number of recolors needed is updated as we iterate through all possible subarrays.

Approach-2 (Sliding Window):
Instead of recalculating for every subarray, this approach maintains a sliding window of size k, efficiently updating the count of 'W' as the window moves. This helps in reducing redundant computations and speeds up the process.
✨ Timelines✨
00:00 - Introduction
0:42 - Motivation
1:07 - Problem Explanation
3:19 - Thought Process (Brute Force)
7:30 - Coding Brute Force
9:54 - Brute Force Time & Space Complexity
10:10 - Optimal Approach
11:30 - Dry Run of Optimal Approach
16:54 - Optimal Time & Space Complexity
17:10 - 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

Видео Minimum Recolors to Get K Consecutive Black Blocks | 2 Approaches | Leetcode 2379 | codestorywithMIK канала codestorywithMIK
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять