840. Magic Squares In Grid | Leetcode Daily Challenge | DSA | Hindi

Опубликовано: 31 Март 2026
на канале: ShashCode
6,134
241

Problem Name:
840. Magic Squares In Grid

Problem Statement:
A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum.

Given a row x col grid of integers, how many 3 x 3 contiguous magic square subgrids are there?

Note: while a magic square can only contain numbers from 1 to 9, grid may contain numbers up to 15.

Problem Link:
https://leetcode.com/problems/magic-s...

Solution Link:
https://github.com/Tiwarishashwat/Int...

Graph Playlist:
   • Graph Data Structure Series  

Java Plus DSA Placement Course Playlist:
   • Playlist  

Java Plus DSA Sheet:
https://docs.google.com/spreadsheets/...

Notes:
https://github.com/Tiwarishashwat/Jav...

Telegram Link:
https://shashwattiwari.page.link/tele...

Ultimate Recursion Series Playlist:
   • Playlist  

Instagram Handle: (@shashwat_tiwari_st)
https://shashwattiwari.page.link/shas...

Samsung Interview Experience:
   • I cracked Samsung | SRIB Interview Experie...  

Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung

Timestamp:
0:00 - Introduction

#ShashwatTiwari #coding​​ #problemsolving​