Тёмный
No video :(

std::unordered_multiset In C++ 

CppNuts
Подписаться 76 тыс.
Просмотров 8 тыс.
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 std::unordered_multiset in STL.
NOTES:
0. std::unordered_multiset is an associative container that contains set of possibly non-unique objects.
1. Search, insertion, and removal have average constant-time complexity.
2. Internally, the elements are organised into buckets.
3. It uses hashing to insert elements into buckets.
4. This allows fast access to individual elements, because after computing the hash of the value it refers to
the exact bucket the element is placed into.
WHY UNORDERED_MULTISET
0. maintain a collection of non-uniqe items with fast insertion and removal.
#dsa #algorithm #cpp #programming #tutorial #competitiveprogramming

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

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@lazizaakramova8602
@lazizaakramova8602 Год назад
Thank you! Incredible!
@mohammedsuhailbasha4860
@mohammedsuhailbasha4860 4 года назад
Very nice explaination sir
@CppNuts
@CppNuts 4 года назад
Thanks..
@karthickkumar1380
@karthickkumar1380 3 года назад
God You;
@CppNuts
@CppNuts 3 года назад
Thanks dude..
@FinanceMode14
@FinanceMode14 2 года назад
thank you so much sir
@CppNuts
@CppNuts 2 года назад
Welcome
@Virus-ke8xj
@Virus-ke8xj 4 года назад
why did you compare it with map, where map contains only a single key value pair?
@right_way1723
@right_way1723 4 года назад
exactly, even i have the same doubt
@ayushthakur2896
@ayushthakur2896 4 года назад
Same doubt!!!!!!!
@trojanhorse8278
@trojanhorse8278 Год назад
Just a guess, may be what we can do with map is, suppose we want to maintain the count of particular value then we can use the value as the key and we can map it with its number of occurrences. Suppose we want to store two times the value 3 then in key part store 3 and map it with value 2.
@BhupendraYadav-li4ts
@BhupendraYadav-li4ts 4 года назад
C++ hash function for unorderd_map, unordered_set is not very good, a lot times i got TLE using them. Although, they are certainly faster than set, map
@CppNuts
@CppNuts 4 года назад
Time limit exceeded. In competitive programing.. this is the worst nightmare.. 🙉💀
@CppNuts
@CppNuts 4 года назад
Actually as i said, if you have to re-arrange buckets too much then it is slow. And there is something i said wrong in this video, i said it keeps the copy of objects if they are duplicate but it only keeps the count of duplicate values. So now i can't change anything in video so i will comment below. Thanks for asking this so i remember that..
@CppNuts
@CppNuts 4 года назад
Ok if that is the case then i will remove my comment. Thanks for clarification..
@mihirkumarsrivastava1895
@mihirkumarsrivastava1895 3 года назад
Hi
@akashkumarbeniwal7674
@akashkumarbeniwal7674 4 года назад
hlo
@ayushthakur2896
@ayushthakur2896 4 года назад
Why not use list in place of unordered multiset when you say time complexity is the only factor to prefer???
@mihirkumarsrivastava9389
@mihirkumarsrivastava9389 3 года назад
because in list insertion and removal can be performed in O(1) time but many other functions like find, count, erase can be done in O(1) time in unordered multiset but not in list which can take O(n) time in average, because list uses doubly linked list internally whereas unordered multiset is internally implemented by hashing, you can use list depending upon situation and problem. To have different in-built functions in unordered multiset you can refer to geeksforgeeks. www.geeksforgeeks.org/unordered_multiset-and-its-uses/
@ayushthakur2896
@ayushthakur2896 3 года назад
@@mihirkumarsrivastava9389 Thanks !!! ;)
@mihirkumarsrivastava9389
@mihirkumarsrivastava9389 3 года назад
@@ayushthakur2896 welcome ☺️
@Sane_25
@Sane_25 2 года назад
what about multiset
@CppNuts
@CppNuts 2 года назад
It’s there 😀
Далее
std::unordered_map In C++ | STL C++
6:48
Просмотров 61 тыс.
Weak Pointer In C++
16:47
Просмотров 25 тыс.
The kindhearted bunny officer helps the disabled!
00:20
forward list In C++
12:39
Просмотров 19 тыс.
std::unordered_set In C++
11:50
Просмотров 33 тыс.
Multiset In C++
10:20
Просмотров 37 тыс.
Rotation without rotating.
16:52
Просмотров 1 млн
why do header files even exist?
10:53
Просмотров 392 тыс.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Rust and RAII Memory Management - Computerphile
24:22
Просмотров 224 тыс.
std::stack In C++
8:27
Просмотров 19 тыс.
Multimap In C++
16:22
Просмотров 36 тыс.
The kindhearted bunny officer helps the disabled!
00:20