- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Leetcode 1277 | Count Square Submatrices with All Ones | Hindi | Java
In this video, we solve the Count Square Submatrices with All Ones problem using two approaches:
1️⃣ Recursive + Memoization Approach – We treat each cell as the bottom-right corner of a square and recursively check its top, left, and diagonal neighbors to determine the largest square it can form. Memoization is used to avoid recomputation and improve efficiency.
2️⃣ Iterative Dynamic Programming Approach – We convert the recursive logic into a bottom-up DP solution. Here, each cell (i, j) stores the size of the largest square ending at that position, based on the values of its top, left, and diagonal neighbors. Summing these values gives the total count of all possible square submatrices.
👉 By the end of this video, you’ll clearly understand how both recursive and iterative DP solutions work step by step.
✨ Don’t forget to Like, Share, and Subscribe if you found this explanation helpful!
#DynamicProgramming #DP #Recursion #Memoization #LeetCode #CodingInterview
Видео Leetcode 1277 | Count Square Submatrices with All Ones | Hindi | Java канала Kernel Queen 👑
1️⃣ Recursive + Memoization Approach – We treat each cell as the bottom-right corner of a square and recursively check its top, left, and diagonal neighbors to determine the largest square it can form. Memoization is used to avoid recomputation and improve efficiency.
2️⃣ Iterative Dynamic Programming Approach – We convert the recursive logic into a bottom-up DP solution. Here, each cell (i, j) stores the size of the largest square ending at that position, based on the values of its top, left, and diagonal neighbors. Summing these values gives the total count of all possible square submatrices.
👉 By the end of this video, you’ll clearly understand how both recursive and iterative DP solutions work step by step.
✨ Don’t forget to Like, Share, and Subscribe if you found this explanation helpful!
#DynamicProgramming #DP #Recursion #Memoization #LeetCode #CodingInterview
Видео Leetcode 1277 | Count Square Submatrices with All Ones | Hindi | Java канала Kernel Queen 👑
Комментарии отсутствуют
Информация о видео
20 августа 2025 г. 7:09:40
00:07:50
Другие видео канала




















