Number of Substrings Containing All Three Characters | Dry Runs | Leetcode 1358 | codestorywithMIK
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A
Sliding Window Playlist - • Sliding Window : Popular Interview Pr...
Similar Better Version of this problem : • Count of Substrings Containing Every ...
Hi Everyone, this is the 36th video of our Playlist "Sliding Window : Popular Interview Problems".
Now we will be solving a good practice Sliding Window problem - Number of Substrings Containing All Three Characters | Similar Problem | Dry Runs | Leetcode 1358 | codestorywithMIK
We will understand from Brute Force why it is a Sliding Window Problem and then we will use the same Khandani Template of Sliding Window.
We will do a deep dive and complete dry run of 2 examples to make things easy.
Problem Name : Number of Substrings Containing All Three Characters | Similar Problem | Dry Runs | Leetcode 1358 | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Sliding Window/Number of Substrings Containing All Three Characters.cpp
Leetcode Link : https://leetcode.com/problems/number-of-substrings-containing-all-three-characters
My DP Concepts Playlist : • Roadmap for DP | How to Start DP ? | ...
My Graph Concepts Playlist : • Graph Concepts & Qns - 1 : Graph will...
My Segment Tree Concepts Playlist : • Segment Tree | Introduction | Basics ...
My Recursion Concepts Playlist : • Introduction | Recursion Concepts And...
Trie Playlist - • Word Search II (Google, Amazon, Meta,...
Difference Array Technique: Concepts & Qns : • Introduction | What | How | Differenc...
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 : / @codestorywithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Video Summary :
The approach uses a sliding window to count substrings containing at least one 'a', 'b', and 'c'. As the right pointer expands, it includes characters in a frequency array. When all three characters are present, the left pointer moves forward, reducing the window while counting valid substrings.
✨ Timelines✨
00:00 - Introduction
0:20 - Motivation
1:15 - Problem Explanation
3:55 - Brute Force
5:15 - Similar Problem Leetcode 3306
6:29 - Khandani Template + Complete Dry Run
15:44 - Another example dry run
18:38 - Time & Space
19:01 - Coding it up
#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