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
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: