Pre-Computation using Prefix Sum in 1D/2D Arrays | Competitive Programming Course | EP 13

preview_player
Показать описание

In this episode 13 of my competitive programming course, I discuss about another pre-computation technique which is Prefix Sum. In this video I explain in detail how we can optimise range sum queries using prefix sum in both 1d and 2d Arrays.

PRACTICE QUESTIONS FOR HASHING & PREFIX SUM :
EASY

EASY MEDIUM/HARD

(for some difficult questions, you might require knowledge of c++ sets/maps)

Timestamps:
Prefix Sum in 1D Arrays : (0:00)
Prefix Sum in 2D Arrays : (9:46)

Be a part of our awesome Community. Join

You can follow me on below platforms for all the latest updates

Blog(Not frequently updated)

Hashtags
#precomputation #prefix #sum #optimise#competitiveprogramming
Рекомендации по теме
Комментарии
Автор

at 18:37 its pf[i][j-1] instead of pf[j][i-1]

iamluv
Автор

your first 10 videos are enough for whole competitive programming course. I have seen lots of competitive programming tutorial but the specific cp tricks are shown by you only. Amazing man.

IIIT guys are known for their deep knowledge is real.

exam_dost
Автор

always on time - your video uploading time complexity is O(1) and space complexity is O(full of knowledge)😁

yourbestie
Автор

2 years and still it remains the best available resource for cp over the internet❤❤

sarvaswamohata
Автор

Kya baat hai😂
Kal hi I encountered a 2D prefix sum based problem in a test.
Appreciate your effor bro thanks💥

abhishekanantharam
Автор

ye course 2 lakh ka he because of tutoring plus please paisa ka matt ke job aisahi bohot paying aapke couse aapke liye poor students ko gift are one of those best persons still prevailing on this earth

barnikroy
Автор

i started this playlist a week ago I really learned a lot until now and will keep learning more from this channel really liked the lectures

husandeepsingh
Автор

That prefix sum of 2-D array was tricky and you explained it ❤️❤️

sawandeepgavel
Автор

Bhaiya aapke karan mujhe Cpp se pyar ho gya thanks.... Yt me bahut saare lectures h but aapke explanation ka koyi jawab nhi isi tarah video's bnate rahye.. 🤗🤩

AshokKumar-ixnf
Автор

Your videos are awesome... You not only help Indian students but also Bangladeshi students... One of my Indian cousin recommended me your playlist. And your way of teaching is on point. And I also shared it to my friend zone & they also liked it. Please continue this & we really enjoy your

Rafiqul.Islam
Автор

My heart cries when educator like this aren't famous enough. Man, I challenge everybody here, if anybody show me better coding teacher than him, I will change my name..

thegreekgoat
Автор

Bestest ever competitive coding course on the internet 🔥👍

jhashivam
Автор

At 7:20 luv proved that he is a logical thinker.👏👏

AppaniMadhavi
Автор

bro you are the pioneer of cp for me, , btw God bless u..love from Bangladesh/

mohammadAmmar
Автор

those who are getting confused with size of prefix array - for 1 based approach u must take N+1 size of array to accomodated nth index unless it will give segmentation fault (accessing the memory which we don't have)

uditkatyal
Автор

Must say you explained this in the best way.

ShubhamChhimpa
Автор

I am loving the course. Just a minor comment in this: In 1d array prefix sum, you have taken elements as int pf[n]. I think it should be long long int pf[n] as taken for 2d. It can exceed the int values.

sagarbarpanda
Автор

Was Waiting For This Thankyou Bro.... Keep On uploading more videos on CP

harshitrathi
Автор

Luv bro, explains the most important things in the most easiest way. I'm observing growth in my CP skills, just in a week😄

shridharsarraf
Автор

IIIT guys are known for their deep knowledge is real.

funenjoynilaypatel
visit shbcf.ru