Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Maximum Side Length of a Square with Sum Less than or Equal to Threshold | 2 Ways | Leetcode 1292

Автор: codestorywithMIK

Загружено: 2026-01-18

Просмотров: 9376

Описание:

iPad PDF Notes Link - https://github.com/MAZHARMIK/Intervie...

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

Hi Everyone, this is the 171st video of our Playlist "Arrays 1D-2D : Popular Interview Problems" by codestorywithMIK.
Today we will be solving a good problem based out of 2D Array and Prefix Sum : Maximum Side Length of a Square with Sum Less than or Equal to Threshold | 2 Approaches | Leetcode 1292 | codestorywithMIK


Problem Name : Maximum Side Length of a Square with Sum Less than or Equal to Threshold | 2 Approaches | Leetcode 1292 | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie...
Leetcode Link : https://leetcode.com/problems/maximum...


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 GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Intervie...
Instagram :   / codestorywithmik  
Facebook :   / 100090524295846  
Twitter :   / cswithmik  
Subscribe to my channel :    / @codestorywithmik  

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


Video Summary :
First, build a 2D prefix sum so the sum of any square can be computed in constant time.
Approach 1 : fixes each cell as the top-left corner and keeps expanding the square greedily until the sum crosses the threshold.
Approach 2 : observes that if a square of side k works, smaller squares will also work, so it binary searches on the side length.
Prefix sums are the key that make both approaches efficient by avoiding repeated sum calculations.


✨ Timelines✨
00:00 Introduction
00:25 Motivation
01:05 Problem Explanation
03:21 Constraints Analysis
03:50 Thought Process - Approach - 1
24:08 How to find Prefix sum in 2D Grid ?
36:10 Using Prefix Grid to find Square sum in O(1)
45:01 Coding it up - Approach-1
52:46 Thought Process - Approach - 2
57:58 Coding it up - Approach-2

#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

Maximum Side Length of a Square with Sum Less than or Equal to Threshold | 2 Ways | Leetcode 1292

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Minimum Pair Removal to Sort Array II | Detailed Explanation | Leetcode 3510 | codestorywithMIK

Minimum Pair Removal to Sort Array II | Detailed Explanation | Leetcode 3510 | codestorywithMIK

Remove K Digits | Intuition | Dry Run | Leetcode 402 | codestorywithMIK

Remove K Digits | Intuition | Dry Run | Leetcode 402 | codestorywithMIK

L24 - Multi Dimensional DP | Maximum Number of Points with Cost | 2D DP | LeetCode 1937 Intuition

L24 - Multi Dimensional DP | Maximum Number of Points with Cost | 2D DP | LeetCode 1937 Intuition

Find the Largest Area of Square Inside Two Rectangles | Simple | Intuitive | Leetcode 3047 | MIK

Find the Largest Area of Square Inside Two Rectangles | Simple | Intuitive | Leetcode 3047 | MIK

Construct the Minimum Bitwise Array I & II | Brute Force | Optimal | Leetcode 3314 & 3315 | MIK

Construct the Minimum Bitwise Array I & II | Brute Force | Optimal | Leetcode 3314 & 3315 | MIK

Segment Tree | Introduction | Basics | Build Segment Tree | Video 1 | codestorywithMIK

Segment Tree | Introduction | Basics | Build Segment Tree | Video 1 | codestorywithMIK

Data Structure and Algorithm Patterns for LeetCode Interviews – Tutorial

Data Structure and Algorithm Patterns for LeetCode Interviews – Tutorial

Путин резко меняет тактику / Впервые применено секретное оружие

Путин резко меняет тактику / Впервые применено секретное оружие

Opencode Заменил мне Claude Code – Вот Почему

Opencode Заменил мне Claude Code – Вот Почему

Я опросил 300 человек с разным уровнем зарплат | Что я обнаружил

Я опросил 300 человек с разным уровнем зарплат | Что я обнаружил

Largest Magic Square | Simplified Explanation | Leetcode 1895 | codestorywithMIK

Largest Magic Square | Simplified Explanation | Leetcode 1895 | codestorywithMIK

Separate Squares I | Understand WHY behind everything | Intuition | Leetcode 3453 | codestorywithMIK

Separate Squares I | Understand WHY behind everything | Intuition | Leetcode 3453 | codestorywithMIK

Визуализация внимания, сердце трансформера | Глава 6, Глубокое обучение

Визуализация внимания, сердце трансформера | Глава 6, Глубокое обучение

Может быть, некоторым людям стоит просто сдаться.

Может быть, некоторым людям стоит просто сдаться.

it only took 2 characters

it only took 2 characters

Трамп идет на Гренландию: встречайте мир без правил! | США, Европа, Россия, Китай, Арктика

Трамп идет на Гренландию: встречайте мир без правил! | США, Европа, Россия, Китай, Арктика

Зеленского накормили этим

Зеленского накормили этим

JEE 2024 | Tukka Strategy | How to Guess the Correct Option

JEE 2024 | Tukka Strategy | How to Guess the Correct Option

7 Japanese Discipline Rules That Rewire Your Brain | Science Backed | codestorywithMIK

7 Japanese Discipline Rules That Rewire Your Brain | Science Backed | codestorywithMIK

Introduction to Programming and Computer Science - Full Course

Introduction to Programming and Computer Science - Full Course

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com