You can think of lower_bound() as the first value in the range greater than or equal to the value we need to find. While upper_bound() gives us the value strictly greater than the value we wish to find in the list. It is a binary search implementation and have many applications in solving problems.
Great explanation. But I think there is a small correction when you say that pair range, range.first is first element while range.second should be iterator after last element and not last element.
Man I really love your tutorial, I though stl is really hard until I saw your playlist. It really helps me to prepare for internship next year! Big love from Australia!
just did the multimap from a map without knowing multimap worked like that :) i did a map[object] = value1; and also value 2 etc its basically a map how i did it? 1) custom object need operator< to be redefined (to place the object in the RBTree) 2) List: public extend std::list with operator= redifined as push_back(something) well if i knew i could iterator so easy in that multimap with range i wouldnt bother myself making that "version of multimap"
I think the main problem is if using a map with a vector you can have O(n) lookup time, but when using multimap you have guaranteed O(logn) lookup time
Yes that should be very easy you just have to to write into text file and read from it, aur check out serialisation and deserialization using text file.
If second pair of function equal_range returns the iterator pointing to last key value So how you write in for loop it!=range.second Will it print all the values of key 'a'
You can think of lower_bound() as the first value in the range greater than or equal to the value we need to find. While upper_bound() gives us the value strictly greater than the value we wish to find in the list. It is a binary search implementation and have many applications in solving problems.
knowing stl is the jumb from c to c++. you do a great job explaining stl in this series. thanks!
Thanks man!!
Great explanation. But I think there is a small correction when you say that pair range, range.first is first element while range.second should be iterator after last element and not last element.
Man I really love your tutorial, I though stl is really hard until I saw your playlist. It really helps me to prepare for internship next year! Big love from Australia!
I also found this channel yesterday and I love it . It's very helpful
Thanks dude..
The way you explain is the one of the best way to explain ...thank you sir !!!😇😇😇
It's my pleasure!!
th-cam.com/video/uGWCMPRDYIw/w-d-xo.html
im giving a comment for algorithm just cuz this helped me
absolutely in love with this channel
Thanks..
Line 33 was really cool.
Teetan Robotics
Hey there I'm not able to get line 33 can u kindly explain me this ?
@@behindthescene4406 Without the auto keyword , writing the line would have been bery hard.
NOT SURE Something like std::multimap Multimap ::range
Teetan Robotics thanks 😃
can you please explain more on iterators
Sure, this is left in the series.
Thanks
just did the multimap from a map without knowing multimap worked like that :)
i did a map[object] = value1; and also value 2 etc
its basically a map
how i did it?
1) custom object need operator< to be redefined (to place the object in the RBTree)
2) List: public extend std::list with operator= redifined as push_back(something)
well if i knew i could iterator so easy in that multimap with range i wouldnt bother myself making that "version of multimap"
I think the main problem is if using a map with a vector you can have O(n) lookup time, but when using multimap you have guaranteed O(logn) lookup time
Nice. Please make it on Multiset as well.
Sure dude!!
thank you so much!
Thanks !!
Very very much thanks
Hi,
Can u suggest me any channel where i can learn Embedded c ,Linux and IPC?
No idea dude.
how to insert elements in multimap mp; ??? if its possible can you tell how?
where can we get all these codes? Can you put these in a github repo? It would be extremely handy.
God You;
Thanks dude..
Thank you
You are welcome..
do you know how to create ,save or load this map into a txt file ?
Yes that should be very easy you just have to to write into text file and read from it, aur check out serialisation and deserialization using text file.
Do u have Linkedin?
Yes..
@@CppNuts can we connect??? What's the ID?
Link is given in about section of my channel.
@@CppNuts ohh thanks bhai!!!
why iterator can be moved it ++;
is the operation it + = 2 impossible?
If second pair of function equal_range returns the iterator pointing to last key value
So how you write in for loop it!=range.second
Will it print all the values of key 'a'
Sir pls don't display sentence on video bcoz we could not see what operation or output is coming
Whats your gpu
RTX 2070.
👍
find returns iterator and not pair..