Count Binary Substrings | Simple Intuition | Dry Run | Leetcode 696 | codestorywithMIK
Автор: codestorywithMIK
Загружено: 2026-02-18
Просмотров: 9469
Описание:
Whatsapp Community Link : https://www.whatsapp.com/channel/0029...
Hi Everyone, this is the 139th video of our Playlist "Leetcode Easy : Popular Interview Problems".
Now we will be solving a simple string related problem - Count Binary Substrings | Simple Intuition | Dry Run | Leetcode 696 | codestorywithMIK
Problem Name : Count Binary Substrings | Simple Intuition | Dry Run | Leetcode 696 | codestorywithMIK
Company Tags : Helix
My solutions on Github(C++ & JAVA) - https://github.com/MAZHARMIK/Intervie...
Leetcode Link : https://leetcode.com/problems/count-b...
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...
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 key idea is to group consecutive same characters and track their lengths instead of checking every possible substring.
Each valid binary substring must have equal consecutive 0s and 1s, so what really matters is the size of the current group and the previous group.
Whenever the character changes, we add min(prevGroupSize, currGroupSize) because that’s the number of balanced substrings we can form between those two adjacent groups.
So instead of brute force, we just scan once, count group sizes, and compare neighbors. Clean, linear, and very efficient.
✨ Timelines✨
00:00 - Introduction
00:09 - Motivation
00:34 - Problem Explanation
02:43 - Thought Process and Intuition
07:27 - Complete Dry Run
11:20 - 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
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: