Тёмный
No video :(

Multimap In C++ 

CppNuts
Подписаться 76 тыс.
Просмотров 37 тыс.
50% 1

JOIN ME
-----
RU-vid 🎬 / @cppnuts
Patreon 🚀 / cppnuts
COMPLETE PLAYLIST
------------
C++ Tutorial For Beginners: • Introduction To C++
STL (Standard Template Library): • STL In C++
ThreadIng In C++: • Multithreading In C++
Data Structures: • Data Structure
Algorithms: • Binary Search
Design Patterns: • Factory Design Pattern...
Smart Pointers: • Smart Pointer In C++
C++14: • Digit Separator In C++
C++17: • std string_view in C++...
C++ All Type Casts: • static_cast In C++
INTERVIEW PLAYLIST
------------
C++ Interview Q&A: • Structural Padding & P...
C++ Interview Q&A For Experienced: • How delete[] Knows How...
Linked List Interview Questions: • Find Kth Node From Bac...
BST Interview Questions: • Search Element In Bina...
Array Interview Questions: • Reverse An Array
String Interview Questions: • Check String Is Palind...
Bit Manipulation Questions: • Find Set Bit In Intege...
Binary Tree Interview Question: • Invert Binary Tree
Sorting Algorithms: • Bubble Sort
C++ MCQ: • Video
C MCQ: • What printf returns af...
C Interview Questions: • Designated Initializat...
QUICK SHORT VIDEOS
-------------
C++ Short : • C++ Short Videos
C Short : • Shorts C Programming MCQ
In this video we will learn how to use multimap in cpp programming language, and few important points to remember are as follows :
1. Multimap is an associative container that contains a sorted list of key-value pairs,
while permitting multiple entries with the same key.
2. It store key value pair in sorted order on the basis of key (assending/decending).
3. Data structure used in multimap is not defined by standard, but red-black tree is assumed by most of the people.
4. Lookup: count, find, contains, equal_range, lower_bound, upper_bound
5. We dont have at() and [] functions to get element like we had in std::map.
#multimap #stl #cpp #programming #tutorial #computerscience #softwareengineering

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

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 53   
@PoojaSingh-tw6ed
@PoojaSingh-tw6ed 4 года назад
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.
@tahaalkhashmany5678
@tahaalkhashmany5678 4 года назад
knowing stl is the jumb from c to c++. you do a great job explaining stl in this series. thanks!
@CppNuts
@CppNuts 4 года назад
Thanks man!!
@nitindubey3092
@nitindubey3092 3 года назад
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.
@KaiBeatbox0803
@KaiBeatbox0803 3 года назад
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!
@ravisahu4658
@ravisahu4658 3 года назад
I also found this channel yesterday and I love it . It's very helpful
@CppNuts
@CppNuts 3 года назад
Thanks dude..
@neuron8186
@neuron8186 3 года назад
absolutely in love with this channel
@CppNuts
@CppNuts 3 года назад
Thanks..
@lawbindpandey402
@lawbindpandey402 4 года назад
The way you explain is the one of the best way to explain ...thank you sir !!!😇😇😇
@CppNuts
@CppNuts 4 года назад
It's my pleasure!!
@educatorshub7860
@educatorshub7860 4 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uGWCMPRDYIw.html
@teetanrobotics5363
@teetanrobotics5363 4 года назад
Line 33 was really cool.
@behindthescene4406
@behindthescene4406 4 года назад
Teetan Robotics Hey there I'm not able to get line 33 can u kindly explain me this ?
@teetanrobotics5363
@teetanrobotics5363 4 года назад
@@behindthescene4406 Without the auto keyword , writing the line would have been bery hard. NOT SURE Something like std::multimap Multimap ::range
@behindthescene4406
@behindthescene4406 4 года назад
Teetan Robotics thanks 😃
@adamrushford
@adamrushford Месяц назад
thank you so much!
@bhupankgoswami5709
@bhupankgoswami5709 4 года назад
Nice. Please make it on Multiset as well.
@CppNuts
@CppNuts 4 года назад
Sure dude!!
@rakeshtanwar3836
@rakeshtanwar3836 4 года назад
Very very much thanks
@Mmegaballs
@Mmegaballs 4 года назад
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"
@JetaJ1
@JetaJ1 3 года назад
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
@christopherapps6177
@christopherapps6177 4 года назад
Thank you
@CppNuts
@CppNuts 4 года назад
You are welcome..
@karthickkumar1380
@karthickkumar1380 3 года назад
God You;
@CppNuts
@CppNuts 3 года назад
Thanks dude..
@meghnasingh9941
@meghnasingh9941 4 года назад
can you please explain more on iterators
@CppNuts
@CppNuts 4 года назад
Sure, this is left in the series. Thanks
@msbabjan2341
@msbabjan2341 4 года назад
Hi, Can u suggest me any channel where i can learn Embedded c ,Linux and IPC?
@CppNuts
@CppNuts 4 года назад
No idea dude.
@ritwik121
@ritwik121 3 года назад
how to insert elements in multimap mp; ??? if its possible can you tell how?
@0saptarshi
@0saptarshi 3 года назад
where can we get all these codes? Can you put these in a github repo? It would be extremely handy.
@Ronie19821905
@Ronie19821905 4 года назад
why iterator can be moved it ++; is the operation it + = 2 impossible?
@mohamedsallam8928
@mohamedsallam8928 4 года назад
do you know how to create ,save or load this map into a txt file ?
@CppNuts
@CppNuts 4 года назад
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.
@SYALUS3
@SYALUS3 4 года назад
👍
@mohammadhaseeb948
@mohammadhaseeb948 4 года назад
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'
@nguyenxuannghia8089
@nguyenxuannghia8089 4 месяца назад
I suggest not to use "auto" in your video for educational purposes, when you assign values returned from a function, like "auto pair = Multimap.find()" and "auto range = Multimap.lowerbound()" (at 12:10). As your video is intended for educational purposes, learners must be well awared of the data type returned from those functions. auto should only be used when developers are familiar with the data type and want to avoid getting detail to it, as a way of being "lazy".
@ShrisalimathShri
@ShrisalimathShri 3 года назад
Sir pls don't display sentence on video bcoz we could not see what operation or output is coming
@sambitkar2330
@sambitkar2330 3 года назад
Do u have Linkedin?
@CppNuts
@CppNuts 3 года назад
Yes..
@sambitkar2330
@sambitkar2330 3 года назад
@@CppNuts can we connect??? What's the ID?
@CppNuts
@CppNuts 3 года назад
Link is given in about section of my channel.
@sambitkar2330
@sambitkar2330 3 года назад
@@CppNuts ohh thanks bhai!!!
@Kaivalyamani
@Kaivalyamani 3 года назад
Whats your gpu
@CppNuts
@CppNuts 3 года назад
RTX 2070.
@237sameer1
@237sameer1 3 года назад
find returns iterator and not pair..
Далее
Emplace In C++
7:03
Просмотров 23 тыс.
Should you learn C++?? | Prime Reacts
20:29
Просмотров 349 тыс.
Italians vs @BayashiTV_  SO CLOSE
00:30
Просмотров 3,5 млн
forward list In C++
12:39
Просмотров 19 тыс.
Map In C++
13:54
Просмотров 137 тыс.
Multiset In C++
10:20
Просмотров 37 тыс.
Networking in C++
32:50
Просмотров 242 тыс.
The Superpower of C++
7:27
Просмотров 35 тыс.
Weak Pointer In C++
16:47
Просмотров 25 тыс.
What is a Monad? - Computerphile
21:50
Просмотров 600 тыс.
I did a C++ University Assignment
50:23
Просмотров 290 тыс.
31 nooby C++ habits you need to ditch
16:18
Просмотров 766 тыс.
Italians vs @BayashiTV_  SO CLOSE
00:30
Просмотров 3,5 млн