Everything about C++ STL MAPS - Part 1 | Competitive Programming Course | Episode 25
Вставка
- Опубліковано 10 чер 2024
- C++ STL TUTORIALS : • C++ STL | Competitive ...
FREE COMPETITIVE PROGRAMMING COURSE TUTORIALS : • Competitive Programmin...
FOR DOUBTS AND DISCUSSIONS, JOIN DISCORD : / discord
This video is part 1 of C++ STL MAPS. In part 1, I discuss in detail about maps, their functions, how to use them and this video due to time restriction I only discuss normal maps and next part I will discuss Unordered maps and a basic Introduction to Multimaps as well.
Practice Questions:
Note: Its hard to find practice questions particularly for STL as they are generally used with other concepts involved hence not providing a lot of them in STL videos. Below are some questions for practice:
practice.geeksforgeeks.org/pr...
codeforces.com/problemset/pro...
codeforces.com/problemset/pro...
www.hackerrank.com/challenges...
www.geeksforgeeks.org/tag/cpp...
Timestamps:
Basics of Map : (0:00)
Basic code of Map : (3:44)
Find And Erase : (11:59)
Time complexity dependency on keys: (16:45)
Question on Map : (19:10)
Be a part of our awesome Community. Join
○ Discord : / discord
○ Telegram : t.me/LuvIsMeYT
You can follow me on below platforms for all the latest updates
○ Instagram : / i._m_.luv
○ Twitter : / luvk1412
○ Linkedin : / luvk1412
Blog(Not frequently updated)
○ Blog : www.codewithluv.in
Hashtags
#maps #unordered #stl #tutorial #competitivecoding
Hi everyone there is a little correction at 11:40, I said that loop is O(NLogN) but it O(N).
Explanation : Accessing values through iterator is a O(1) operation as iterator has address of the value and access value at some address if you know the address is a unit time operation. Now when we traverse the map, we start from m.begin() and are doing it++ in each step, it++ is also O(1) , so whole map traversal is O(1) only. at 11:40 we are not using iterators but internally that only is happening, pr is the value at address pointer by iterator, internally range based loops is also iterating through maps using iterators and then providing us reference to to the value at that address.
But when you want to directly access some specific value in map using m[key] or m.find(key), these are log(n) operations as log(n)time is taken by map to search this key.
but bhiya as you explained in the previous video, here 'pr' will identify its datatype througn 'm' as .Then how come 'pr' becomes an iterator?
(or) are you saying it as iterator because you used 'pr' as reference ?
(or) are you saying the variable in range based loops is always an iterator?
please explain bhiya.
thank u :-)
@@vk6297 variable in range based loops is always the value, neither a pointer nor an iterator
one correction for n elements map traversal will be O(n) as stated by you in first line but in the explanation you wrote ,so whole map traversal is O(1) only
Got ya point bhaiya 👍
@@pranavsharma7479 same doubt
Tbh u r the first youtuber whose cpp lectures are really understandable
Can t agree more!
yeah
I didn't understand a word
@@jommys become indian!
@@dhruvyadav3492 LMAO 🤣
Really this is one of the most underrated channel in UA-cam. Hats off to you for providing detailed videos on such important concepts like these. Please continue making videos on such topics.
Just want to thank you for such a beautifully explained video, always had a problem with handling maps but now, it's all crystal clear. Again, thank you
bro your playlist is amazing I never felt that much motivated yet but after this I'm solving some good questions please complete this course for students like me it's very helpful for real thanks a lot.
I visited this channel first time, and i am very much impressed by the ease with which luv teaches.👌🏻
thanks man, you made everything easy, one of the best explainations on yt
I visited this channel first time, and i am very much impressed by the ease with which luv teaches
I have watched many tutorial in youtube ,,but i havenot seen anyone to teach like this,,very helpful..
Great work bro, this video gave me some pointers that i didn't knew about even after reading articles on maps from gfg and other sources. Thank you for you efforts.
buddy you nailed it.. big tym .. i aint gonna miss any of ur content from nw on .. cheers to ur hard work mate :)
The transition at 23:50 was so smooth ^^
Your teaching style is really impressive. Thanks a lot bro for all your hard work.
I have seen so many cpp playlists until now but yours is just on another level.....very easy to understand...thank you so much for such valueable resource brother 🌸🛐
Things learnt.
//Everything about C++ STL MAPS - Part 1 | Competitive Programming Course | Episode 25
#include
using namespace std;
#define pb push_back
#define f first
#define s second
#define REP(i, a, b) for (int i=a; i
Thnx bro
how m[s]++ increases count of second
@@citrus5127 its just increment(increases by 1) the value of respective string
@@xd9050 it is but how when we don't give m[s] then empty string
You explain so well and amazing . Thanks, Bro.
I stuck map in the last few months, But this video really help me. Your approach is very unique and helpful for all. Thank You
You are making my programming journey much more easier. Take love&respect from Bangladesh.💚
Straight to the point and understandable !
what a amazing explanation and the whole playlist..... thank you so much
Problems in the description has, cleared all my thinking ability towards the maps, thank you luv sir
Your efforts are really commendable ❤️
Thanks for this awesome LECTURE. You are the best teacher on yt sir :)
You are Awesome, sir..
God bless you...
from🇧🇩
Carry on! We are with you.
You cover complicate topic very easily and solve all doubts
Hey luv bro, thanks for your stl series, it's really simple to understand.
STL series is part of the full competitive series, link to full playlist is in description.
Bhaiya, sach me bahut acha explain karte ho, app!
Love u bhyya thank you baki sb, Sirf view and subscriber ke liye krte hai bt aap *why when and how to use it* btate hai
thanks, bhiya . your videos are too great . you are putting great efforts for us thanks for this . your explanation is far better than paid courses . 👌
Nobody explain c++ better than Luv bhaiya, Thank you so much bhaiya for giving ur tym nd for this wonder ful playlist🙏🙏
awesome simple and understandable for everyone
Boht badiya samjhaya hai Excellent bhai
Loving your explanation. :)
Thank u! These videos are on another level💖
your videos are really very helpful for me to understand the concepts . Thank you for your hardwork which makes it easy too understand .
please add more videos releated to compatative programming .
Brilliant bhai, thank Q and love You brother from India !!!
this was really helpful and you legit did a great job explaining it, thanks
easy to understand ,thankyou❤
really appreciate the content bro
thanks for amazing explaination
Thank you sir !! awesome explanation.👍👍
whata amazing transition in the end
Your Hard Work in making Video is benificial for us. Thanks a lot Gurujii
Really bro . Your teaching skills are extraordinary . Keep uploading the videos. It would be really helpful if you would make similar kind of videos on hard topics like dynamic programming or backtracking.
great explanation!! thanks a lot sir!
You made it so easy to understand
Thanks luv for making these concepts so easy. Best part is you dont make videos too long and edit properly. Good waork bhai.
your lectures help me very much.. thanks 🙏🏻
Ahh...I found this and it is really good. Thanks luv :)
i just undersTAND A THING THAT I JUST NEED TO FOLLOW YOU BLINDLY FOR CC
you are just great .just keep making more and more and more...........................
Amazing content..what else do u need?
I'm lovin it....!
Thank you Bhaiya 🙏🙏🙏♥️😊
this video helps me to solve Raman to Int problem
Really helpful course! 🔥
This is a really amazing stl series 🤟
Thanks bhai itne acche explanation ke liye
Thanks a lot bro👍.Amazing explanation.
Very nice explanation...thanku
Great content, thank you very much
yaar bhut acha samjhaya thanks bro
Everytime luv Bhaiya is just amazing.
So nicely explained 😀.
Problem set is as amazing as video.
Bhai you are awesome .Keep up the good work🤗🤗
Awesome Explaination
You are really awesome....
Thank you...❤️
You have done great work bro thank you👌
very nice bro really enjoyed the whole video ...❤❤
Thank you sir🙏
Pretty underrated !
Thank you ❤️
Great Explaination
great job bhaiya!!
Bro you are an inspiration.
THANKS A LOT BHAIYA .YOUR VIDEOS ARE LIKE AWESOME
for earse funciton if we passing the iterator than time complexity of earser function is going to be O(1)
Awesome videos , Thank you Luv bhaiya
Bro would you consider watching my video on maps and unordered maps
Sir, At least ek week me 4 videos bnaya kro, agar possible ho to.
Bhut help milta h videos se.
He is already doing a great effort.
nhi hai possible
awesome luv bro.
thanks and liked the animation in the end.
VEry well explained ❤❤
Understood sir ❤🙏🙇♂
u r GEM !
Good explanation😇
This is the most underrated channel for CP and DSA .....😑
Thank You
Thank you bhaiya
Thank you!
Salam hai Bhai tumko.
Thanks sir ❤️
very nice !
These videos are 💓
thanku brother
Thanks❣️
I am even ready to pay for this content , awesoooooome !!!!!!
bro you make everything so easy to understand, tysm 💟
good video, very helpful
bhaiya, I really like your videos
best explanation