ycliper

Популярное

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

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

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

Топ запросов

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

Get Biggest Three Rhombus Sums in a Grid | Brute Force | Optimal | Leetcode 1878 | codestorywithMIK

Автор: codestorywithMIK

Загружено: 2026-03-15

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

Описание: Whatsapp Community Link : https://www.whatsapp.com/channel/0029...

Hi Everyone, this is the 173rd video of our Playlist "Arrays 1D-2D : Popular Interview Problems" by codestorywithMIK.
Today we will be solving a good visualization problem based on 2D-Arrays : Get Biggest Three Rhombus Sums in a Grid | Brute Force | Optimal | Detailed | Leetcode 1878 | codestorywithMIK


Problem Name : Get Biggest Three Rhombus Sums in a Grid | Brute Force | Optimal | Detailed | Leetcode 1878 | codestorywithMIK
Company Tags : Will update later
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie...
Leetcode Link : https://leetcode.com/problems/get-big...


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

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


Video Summary :
Approach 1 (Brute Force):
For every cell, treat it as the center of a rhombus and expand the side length while staying inside the grid. For each possible rhombus, walk along its four edges and add the values manually. All sums are inserted into a set that keeps only the largest three distinct values.

Approach 2 (Diagonal Prefix Sum):
Same idea of expanding rhombuses from each center, but instead of traversing every edge cell, we precompute prefix sums along both diagonals. This lets us get the sum of each rhombus edge in constant time. As a result, the innermost loop disappears and the computation becomes much faster.



✨ Timelines✨
00:00 Introduction
00:09 Motivation
00:36 Problem Explanation
05:53 Thought Process - Brute Force
41:18 Coding Brute Force
45:45 Optimal Intuition + Visualization
51:20 Important Point
56:25 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

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Get Biggest Three Rhombus Sums in a Grid | Brute Force | Optimal | Leetcode 1878 | codestorywithMIK

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

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

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

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

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

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

Fancy Sequence | Made Super Simple | Intuitive | Detailed | Leetcode 1622 | codestorywithMIK

Fancy Sequence | Made Super Simple | Intuitive | Detailed | Leetcode 1622 | codestorywithMIK

Minimum Number of Flips to Make the Binary String Alternating | 3 Detailed Approach | Leetcode 1888

Minimum Number of Flips to Make the Binary String Alternating | 3 Detailed Approach | Leetcode 1888

Minimum Swaps to Arrange a Binary Grid | Intuition | Dry Run | Leetcode 1536 | codestorywithMIK

Minimum Swaps to Arrange a Binary Grid | Intuition | Dry Run | Leetcode 1536 | codestorywithMIK

Partitioning Into Minimum Number Of Deci-Binary Numbers | Brute Force | Trick | Leetcode 1689 | MIK

Partitioning Into Minimum Number Of Deci-Binary Numbers | Brute Force | Trick | Leetcode 1689 | MIK

Эту НОВУЮ Мапу в GO Должен Знать Каждый GO-Разработчик

Эту НОВУЮ Мапу в GO Должен Знать Каждый GO-Разработчик

Решаю задачи с собеседований Python Backend стажёр

Решаю задачи с собеседований Python Backend стажёр

Complement of Base 10 Integer | 3 Detailed Approaches | Leetcode 1009 | codestorywithMIK

Complement of Base 10 Integer | 3 Detailed Approaches | Leetcode 1009 | codestorywithMIK

Почему AI генерит мусор — и как заставить его писать нормальный код

Почему AI генерит мусор — и как заставить его писать нормальный код

ТЕСТ на УРОВЕНЬ АНГЛИЙСКОГО 15 минут

ТЕСТ на УРОВЕНЬ АНГЛИЙСКОГО 15 минут

Я сэкономил 1460 часов на обучении (NotebookLM + Gemini + Obsidian)

Я сэкономил 1460 часов на обучении (NotebookLM + Gemini + Obsidian)

Как Windows работает с ОЗУ или почему вам НЕ НУЖНЫ гигабайты памяти

Как Windows работает с ОЗУ или почему вам НЕ НУЖНЫ гигабайты памяти

Minimum Number of Seconds to Make Mountain Height Zero | Understand WHY | Leetcode 3296 | MIK

Minimum Number of Seconds to Make Mountain Height Zero | Understand WHY | Leetcode 3296 | MIK

Является ли математика наукой?

Является ли математика наукой?

Проектирование системы на основе первых принципов[10/15] - Кэширование

Проектирование системы на основе первых принципов[10/15] - Кэширование

КАК УСТРОЕН TCP/IP?

КАК УСТРОЕН TCP/IP?

Лучший Гайд по Kafka для Начинающих За 1 Час

Лучший Гайд по Kafka для Начинающих За 1 Час

Qwen3-coder-next -- НОВЫЙ ТОП ИИ ЛОКАЛЬНО, БЕСПЛАТНО И БЕЗЛИМИТНО! CLI, сравнение кодинг агентов

Qwen3-coder-next -- НОВЫЙ ТОП ИИ ЛОКАЛЬНО, БЕСПЛАТНО И БЕЗЛИМИТНО! CLI, сравнение кодинг агентов

Джеймс Уэб нашёл в ранней Вселенной азот, которого там быть не должно.

Джеймс Уэб нашёл в ранней Вселенной азот, которого там быть не должно.

GLM-5 УНИЧТОЖИЛА DeepSeek! Бесплатная нейросеть БЕЗ ограничений. Полный тест 2026

GLM-5 УНИЧТОЖИЛА DeepSeek! Бесплатная нейросеть БЕЗ ограничений. Полный тест 2026

Последний шанс для 3D-шников и дизайнеров | План доминирования в период ИИ-бума

Последний шанс для 3D-шников и дизайнеров | План доминирования в период ИИ-бума

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



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



Контакты для правообладателей: [email protected]