Тёмный

Range Sum Query 2D | Leetcode  

Techdose
Подписаться 171 тыс.
Просмотров 10 тыс.
50% 1

This video explains a very important programming interview problem based on 2d matrix which is finding range sum on a 2D matrix. If this problem was on 1D array then we could have applied prefix sum or segment tree if updates were allowed. In this case, we don't have updates, so 2D prefix sum array can be built to solve the problem. This will take order of number of rows or columns time depending on how we build prefix sum array. The best approach however just does preprocessing once and we can solve each query in O(1) constant time. I have explained all the approaches one by one to solve the problem along with intuition and examples.
CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
======================================PLEASE DONATE=============================
🧡 SUPPORT OUR WORK: / techdose
💚 UPI-ID: surya.kahar@ybl
💞JOIN Membership: / @techdose4u
==============================================================================
INSTAGRAM : / surya.pratap.k
LinkedIn: / surya-pratap-kahar-47b...
WEBSITE: techdose.co.in/
TELEGRAM Channel LINK: t.me/codewithTECHDOSE
TELEGRAM Group LINK: t.me/joinchat/SRVOIxWR4sRIVv5...
=======================================================================
USEFUL LINKS:
🟠Must do TIPS to ACE Virtual Interview: • 🔴Must do Tips to ACE y...
🟢Best strategy to excel your coding interview: • 🔴Best strategy to exce...
🟡Get your dream job in 1 month: • 🔴Get your dream job in...
🔵How to crack dream job in just 2 months: • How to crack dream job...
🟣7 Days DSA plan: techdose.co.in/7-days-dsa-che...
RELATED LINKS:
CODE LINK: gist.github.com/SuryaPratapK/...

Опубликовано:

 

15 фев 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@t-m5678
@t-m5678 6 месяцев назад
thank you. your explanation has increased my understanding. I was stumped on this for several days. Now I understand.👍
@user-hm4vc9dp1t
@user-hm4vc9dp1t 3 месяца назад
God Level Logic
@muditchoudhary28
@muditchoudhary28 9 месяцев назад
Thanks! great explanation
@ksTales
@ksTales 2 года назад
Amazing explanation sir
@ashisranjandey7541
@ashisranjandey7541 7 месяцев назад
Great and correct explanation!!
@monojit104
@monojit104 2 года назад
Could you please make video for Leetcode 2104?
@JangBahadur3028
@JangBahadur3028 2 года назад
Lovely new logo
@techdose4u
@techdose4u 2 года назад
Thanks :)
@SunilSahu-li4cy
@SunilSahu-li4cy 2 года назад
Could you please make a video on Leetcode 847....
@techdose4u
@techdose4u 2 года назад
Will try for it
@rajankhunt7002
@rajankhunt7002 2 года назад
Optimum location of point to minimize total distance [OR] Rasta and Kheshtak in SEARCH AND SORT if you make on video plz, plz, plz,
Далее
Car Pooling | Leetcode #1094
18:31
Просмотров 10 тыс.
🔴Ютуб закрывают... Пока?
00:39
Просмотров 851 тыс.
UNO!
00:18
Просмотров 1,1 млн
Range Sum Query 2D - Immutable - Leetcode 304 - Python
13:17
Sum Query in 2D Immutable Array Dynamic Programming
18:34
Nikhil Kamath x Ranbir Kapoor | People by WTF Ep #2
1:50:31
Shortest Subarray with Sum at Least K | Leetcode #862
21:31
Minimum Size Subarray Sum | Leetcode #209
22:10
Просмотров 30 тыс.
Range Sum Query Immutable - Leetcode 303 - Python
7:42
Sum of all Submatrices
16:36
Просмотров 5 тыс.
🔴Ютуб закрывают... Пока?
00:39
Просмотров 851 тыс.