Prefix Sums - Problems, Code in C++ & Python

  Рет қаралды 56,840

Errichto Algorithms

Errichto Algorithms

Күн бұрын

Пікірлер: 111
@mihiradarsh7604
@mihiradarsh7604 Жыл бұрын
Finally he is here👏👏
@kartikeysingh8376
@kartikeysingh8376 Жыл бұрын
Long time no see happy that you are back 🙂 please make videos continuously ,it helps a lot
@caiodavi9829
@caiodavi9829 Жыл бұрын
no way!!! i was looking for this video last week, but i saw you had not uploaded in a long time… what a nice timing. welcome back, errichto!🎉🎉
@tle-dewcodes7166
@tle-dewcodes7166 Жыл бұрын
Finally Errichto remembers, That he has a KZbin channel😅
@GospodinStanoje
@GospodinStanoje Жыл бұрын
Thanks for posting again! I really appreciate your videos. Your voice is calm and you're gifted in explaining it simply. Greetings from Serbia.
@coldxwave
@coldxwave Жыл бұрын
Glad you're back!!!
@atifayaz3495
@atifayaz3495 11 ай бұрын
0:00 What is prefix sums? 4:31 Problem 1 : Static range sum queries 7:09 Problem 2 : Most common character in the substring 15:41 Problem 3 : Array manipulation 🤯 18:49 Summary
@ivan0kurnia
@ivan0kurnia Ай бұрын
This should be on top!
@jlecampana
@jlecampana Жыл бұрын
Your lectures are fantastic, just the right amount of theoretical foundation and then a code dive-in, very well done, keep 'em coming Mr. Errichto!
@TheBackendDeveloper-b6t
@TheBackendDeveloper-b6t Жыл бұрын
Finally you are back , i used to watch your videos when i eat food , finally again some great content . Love you man ....
@detective1723
@detective1723 Жыл бұрын
He is back!🎉
@malekissa1771
@malekissa1771 Жыл бұрын
We missed you so much
@sachinkahawala7764
@sachinkahawala7764 Жыл бұрын
Errichto is back! ❤️
@amreezkhan5530
@amreezkhan5530 Жыл бұрын
He is backkk🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉❤❤❤❤
@akramelomrani8728
@akramelomrani8728 Жыл бұрын
Errichto remembered his gmail password at last.
@blagojrs
@blagojrs Жыл бұрын
The legend's back!
@sharp615
@sharp615 Жыл бұрын
The man himself is back at it again. Nice to have you back
@abd0-omar420
@abd0-omar420 Жыл бұрын
I watched the binary search video and solved the problem you mentioned and more, and I will try to do that on this one again, and soon I will watch your dynamic programming series and solve them. Thank you so much for your guidance and I hope you upload more because they are great and straightforward
@zanies6288
@zanies6288 Жыл бұрын
If you are really interested in learning and have some free time. You should watch videos (previously recorded livestream) from Colin galen and Vivek gupta.
@abd0-omar420
@abd0-omar420 Жыл бұрын
@@zanies6288 thank you so much for the recommendations, I really appreciate it and I will grind to solve and learn from them
@tetrreter6548
@tetrreter6548 Жыл бұрын
it's too time to see you again 🎉 I'm so happy ❤
@DrKeK-gh6sm
@DrKeK-gh6sm Жыл бұрын
Thank you so much errichto, i was just looking for prefix/suffix sums for the last few days
@inde_t
@inde_t 4 ай бұрын
still haven't studied 2d prefix sum because i've been waiting for your video
@mahadihassan1342
@mahadihassan1342 Жыл бұрын
Finally he is back after a long time 😊.
@abc_cba
@abc_cba 4 ай бұрын
Miss your content. I wish you come back. Best wishes from India
@abd0-omar420
@abd0-omar420 Жыл бұрын
Thank you for sharing this video! Your demonstration of the algorithm is amazing and straight forward with easy and hard problems, couldn't ask for a better video, thank you!
@mahmoudel-hawawshy5198
@mahmoudel-hawawshy5198 Жыл бұрын
Thank you for posting educational content, I am really grateful and sure that most people appreciate your content so much too. please keep posting whenever you can, Thank you again!
@vesperflix2211
@vesperflix2211 Жыл бұрын
the way you teach is perfect
@goldenlin9528
@goldenlin9528 Жыл бұрын
Welcome back, glad to see u posting again
@haxortaxor8736
@haxortaxor8736 Жыл бұрын
man im so happy you are back!
@iceman4404
@iceman4404 Жыл бұрын
The chosen one is back
@ADITYAKUMAR-tb4gm
@ADITYAKUMAR-tb4gm Жыл бұрын
Heyyy, very nice to see you back. I've learnt so many stuffs from you
@rimurusama5070
@rimurusama5070 Жыл бұрын
Loved to see your content once again. Thanks you so much.
@Jeggettmega
@Jeggettmega Жыл бұрын
Thanks for the video! That type of content I find the most useful.
@abdullahsaid4765
@abdullahsaid4765 Жыл бұрын
welcome bruh I'm happy to see you long time no see
@shiva_singh1700
@shiva_singh1700 Жыл бұрын
Good to see u back😊
@rajmittal5394
@rajmittal5394 Жыл бұрын
Legend comes🎉🎉🎉
@AryanshTripathi-m4v
@AryanshTripathi-m4v Жыл бұрын
Glad to see you're back🤩
@rodhash
@rodhash Жыл бұрын
wow you are back! we missed you bro
@awgzmp
@awgzmp Жыл бұрын
Does anyone know what does: *ios_base::sync_with_stdio(0);* and *cin.tie(0);* mean?
@Errichto
@Errichto Жыл бұрын
In short, it makes cin/cout faster.
@therealpancake7140
@therealpancake7140 Жыл бұрын
@@Errichto Is it actually any better than using scanf() and printf()? I've done some testing myself and found that cin/cout with the boost are faster but I've also found conflicting results on the internet. What's your experience with the two approaches
@piaIy
@piaIy Жыл бұрын
​@@therealpancake7140 streams work with std::string, which makes them easier to use.
@Algorithmswithsubham
@Algorithmswithsubham Жыл бұрын
happy to see that you are so back
@jasveersingh01
@jasveersingh01 Жыл бұрын
The legend is back guys.❤❤❤❤❤❤
@sakibsidha
@sakibsidha Жыл бұрын
LET'S GOOOOOO! LOOK WHO'S HEREEE
@sepehr__byt
@sepehr__byt Жыл бұрын
I'm glad to see you again
@yevengyklaus7066
@yevengyklaus7066 Жыл бұрын
The myth the man the legend.
@MehbubulHasanAlQuvi
@MehbubulHasanAlQuvi Жыл бұрын
After long time!
@jenwans3055
@jenwans3055 Жыл бұрын
Welcome back man 🔥🤜
@madsbdkerchristensen9597
@madsbdkerchristensen9597 Жыл бұрын
Love your videos, was hoping you would post again soon :)
@juancastaneda5062
@juancastaneda5062 Жыл бұрын
Excellent that you get back....¡¡¡¡¡¡
@nilu-bp6mv
@nilu-bp6mv Жыл бұрын
very happy to see you 😊❤
@AdityaM-i7l
@AdityaM-i7l Жыл бұрын
Top G is back 😌
@akashkishoremukhia7888
@akashkishoremukhia7888 Жыл бұрын
Keep on teach us erricto.🔥🔥
@rifatchowdhury3683
@rifatchowdhury3683 Жыл бұрын
Finally,,,, After A Long Time❤
@shail_
@shail_ Жыл бұрын
Thanks for the fantastic content!🌻
@rahuldasari1886
@rahuldasari1886 Жыл бұрын
Pls make some more videos like this Thank you
@DevChannel-b4i
@DevChannel-b4i Ай бұрын
I have a couple questions about CP, let's assume someone practices very hard until they reach IGM level on CF, after that, how many hours a week would be necessary to just maintain the acquired level? Would just participate in weekly contests be enough?
@OrifxonHusanov
@OrifxonHusanov Жыл бұрын
Legends never die!🙂
@UltraKillpc
@UltraKillpc 9 ай бұрын
The best tutor
@karangarg7004
@karangarg7004 Жыл бұрын
Thank you so muuch for all of this!!❤
@Grainme47
@Grainme47 Жыл бұрын
yeah same request : Please make more videos :)
@pj-nz6nm
@pj-nz6nm Жыл бұрын
After a long time.
@lkdk-m7g
@lkdk-m7g Жыл бұрын
In the last problem can we just put a if statement that adds x if i is in range l to r please correct me if i am wrong And also as some one who just cp is a2oj a good resource or should i do something else also
@Errichto
@Errichto Жыл бұрын
If you do it separately for each of Q updates, the total time complexity is O(N*Q), which is too slow. a2oj is ok as long as you solve problems that are difficult enough for you.
@lkdk-m7g
@lkdk-m7g Жыл бұрын
@@Errichto Thank you very much for your guidance 👍😊
@Liux2040
@Liux2040 Жыл бұрын
Finally!!! I missed you😅
@ayush_sccg8674
@ayush_sccg8674 Жыл бұрын
I guess you will be uploading about algorithms now that's gonna be good
@DrFranzovic
@DrFranzovic Жыл бұрын
hello errichto i am currently on a search for a new laptop for CP and i wanted to know if you got any advices for choosing the right one?
@TheViral_fyp
@TheViral_fyp 10 ай бұрын
Brother can you recommend me which book r best for DSA and competative programming. Ik practice is the key but please recommend me 😊
@sheanemario3909
@sheanemario3909 2 ай бұрын
doesn't it better if we store our a[I] 's starting from 1. I mean skip 0 th index and store them in the array starting from the 1st index
@irvin1241
@irvin1241 Жыл бұрын
long time no see😂
@spideyboy3587
@spideyboy3587 Жыл бұрын
What's the device that you are using to write in screen ? Can you please answer.
@ashwani_kumar_rai
@ashwani_kumar_rai Жыл бұрын
He man thanks please be regular
@khanhuynh9628
@khanhuynh9628 2 ай бұрын
I love this video
@milanboroja7094
@milanboroja7094 Жыл бұрын
Hi from Banja Luka
@theAZ1X
@theAZ1X Жыл бұрын
Good day Errichto! I have question. ( 10:00 ) at the 7 line : s is string s.length() = s.size() ?
@zanies6288
@zanies6288 Жыл бұрын
Yeah same thing
@alkhawarizm780
@alkhawarizm780 6 ай бұрын
sir please made a video for setup far manager
@aisha9763
@aisha9763 Жыл бұрын
Hello kindly hear guys , this is stay-at -home mum , Could I ask for C++, which laptop or computer required? Which one is best ? Which application or soft need to install ( now we use Mac) - thank you so much for your assistance.
@aisha9763
@aisha9763 Жыл бұрын
Good-hearted guys
@adib7143
@adib7143 Жыл бұрын
@aisha9763, I don't use mac but hope this helps kzbin.info/www/bejne/Z3bCnHWJoMaSm8Usi=H77gcqle7X-EVWOy
@Moch117
@Moch117 Жыл бұрын
Does this method work for suffix as well , where we use an array of size + 1? I ran into some errors
@stati5tik
@stati5tik 11 ай бұрын
first problem is basically what integral images are about.
@abrarmasumabir3809
@abrarmasumabir3809 Жыл бұрын
Where did you set pref[0] = 0. Sorry if it is stupid to ask!
@SadriddinDusanov
@SadriddinDusanov Жыл бұрын
raxmat bro
@PeterGriffin_1920
@PeterGriffin_1920 Жыл бұрын
Long time no see
@VP-es6wy
@VP-es6wy Жыл бұрын
Will you be posting regularly?
@georgedrooj8800
@georgedrooj8800 Жыл бұрын
Finally 😍😍😍
@lazyemperor5182
@lazyemperor5182 Жыл бұрын
More videos please
@TheJohnniePlays
@TheJohnniePlays Жыл бұрын
Can you make a tutorial on problem solving. Like picking a harder problem and showing how to come up with some initial observations and ideas and work trough them to come up with a solution. A lot of times I just end up with a blank screen having difficulty even understanding what the problem is about.
@Errichto
@Errichto Жыл бұрын
I have hundreds of videos & streams about problem solving across my two channels. I rarely solve anything without explaining the thought process. If you want to see me struggle for hours, see any Atcoder Grand Contest streams like this one kzbin.info/www/bejne/i3vVq5qgl9GAea8
@TheJohnniePlays
@TheJohnniePlays Жыл бұрын
@@Errichto This is it. Thank you.
@oximas-oe9vf
@oximas-oe9vf 4 ай бұрын
why dont we just go through the range form a to b and up the elements instead of summing from 0 to b then from 0 to a and taking the prior minus the latter?
@hassanali-il3rk
@hassanali-il3rk Жыл бұрын
can i ask hint to hackerrank problem?
@SabarMohamed
@SabarMohamed Жыл бұрын
It's been a while 😭
@nightsusmare8468
@nightsusmare8468 Жыл бұрын
polska gurom
@ingcivil-upm
@ingcivil-upm 6 ай бұрын
more videoss please
@lazyemperor5182
@lazyemperor5182 Жыл бұрын
More edu videos please
@elghalib2209
@elghalib2209 5 ай бұрын
still waiting for 2d prefix sums :(
@AsherDMckoy
@AsherDMckoy Жыл бұрын
Do you still do tutoring?
@Errichto
@Errichto Жыл бұрын
I do. You can find my email id in the "About" section on KZbin.
@WanderArc18
@WanderArc18 Жыл бұрын
✨💫
@kartik4792
@kartik4792 Жыл бұрын
3 views 13 likes!
@richardharris202
@richardharris202 Жыл бұрын
😶‍🌫️✨
@guszkiewiczkrzysztof4438
@guszkiewiczkrzysztof4438 10 ай бұрын
dawaj tyeraz po polsku
@mirza5635
@mirza5635 Жыл бұрын
Eat burger
@camperjett
@camperjett Жыл бұрын
Can this comment get pinned?
@quocanhhbui8271
@quocanhhbui8271 Жыл бұрын
the legend is back!
Sparse Table & RMQ (Range Minimum Query)
18:42
Errichto Algorithms
Рет қаралды 78 М.
Subarray Sum Equals K - Prefix Sums - Leetcode 560 - Python
15:19
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 10 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 25 МЛН
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 12 МЛН
Binary Search tutorial (C++ and Python)
27:41
Errichto Algorithms
Рет қаралды 264 М.
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
C++ Bitsets in Competitive Programming
15:35
Errichto Algorithms
Рет қаралды 121 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 587 М.
SOME UNIQUE C++ CODE! // Pacman Clone Code Review
26:42
The Cherno
Рет қаралды 287 М.
Binary Exponentiation
15:13
Errichto Algorithms
Рет қаралды 102 М.
How to Solve ANY LeetCode Problem (Step-by-Step)
12:37
Codebagel
Рет қаралды 303 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 287 М.
why do void* pointers even exist?
8:17
Low Level
Рет қаралды 388 М.
Computations Modulo P in Competitive Programming
18:15
Errichto Algorithms
Рет қаралды 127 М.