Тёмный
No video :(

STL std::unordered_set (std::algorithm generate_n for creation of sets) | Modern Cpp Series Ep. 122 

Mike Shah
Подписаться 21 тыс.
Просмотров 2,1 тыс.
50% 1

►Full C++ Series Playlist: • The C++ Programming La...
►Find full courses on: courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: In this lesson I give you an introduction to the std::unordered_set data structure which is an unsorted data structure storing unique elements. The advantage is in this case the ability to have average time constant lookup, insertion, and removal. I'll spend some time introducing the concept of a hash table at the start of the lesson, and then I'll also show you how to generate sets using the stl algorithm generate_n.
►RU-vid Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: courses.mshah....

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

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@tanveerasif5978
@tanveerasif5978 Месяц назад
Thank you so much for wonderful underneath concept.
@MikeShah
@MikeShah Месяц назад
Cheers, you are most welcome!
@MightyMoveSemantics
@MightyMoveSemantics 10 месяцев назад
@7:39 Bucket Count (e.g., std::unordered_set s(5);) This is about organizing the internal storage with a specified number of buckets. Elements are distributed among these buckets based on their hash values. Suppose you insert an integer 14. The hash function calculates a hash value, let's say h(14) = 14 for simplicity. The bucket index is then 14 % 5 = 4, so 14 is placed into bucket 4. reserve(5);: This is about optimizing performance by minimizing the number of rehashes when inserting elements. It does so by ensuring there's enough space allocated to hold the specified number of elements without needing to rehash. Am I right?
@MikeShah
@MikeShah 10 месяцев назад
That sounds about right to me!
@thestarinthesky_
@thestarinthesky_ Год назад
Thanks Mike for this great video 🤩! I have a question why @23:36 we got that error? I didn't get it quite why.
@MikeShah
@MikeShah Год назад
I think I just had the wrong type -- needed an iterator that can insert.
@shrek1412
@shrek1412 Год назад
may I know difference between unordered_set and unordered_map?
@MikeShah
@MikeShah Год назад
Unordered set only contains keys, whereas unordered map is a key/value pair. (I.e. stores the keys, same as map, but those keys are used to index and return a value)
@AyushAnand-oj1kl
@AyushAnand-oj1kl Год назад
can you provide me your vim step file and commands to use it.
@MikeShah
@MikeShah Год назад
I use a vanilla vim and occasionally code completion: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-IR6pfkqjbw8.html
Далее
STL std::map  | Modern Cpp Series Ep. 126
36:13
Просмотров 3,4 тыс.
Новый фонарик в iPhone с iOS 18
00:49
Просмотров 440 тыс.
skibidi toilet zombie universe 40 ( New Virus)
03:06
Просмотров 1,8 млн
ARRAYLIST VS LINKEDLIST
21:20
Просмотров 58 тыс.
STL std::vector | Modern Cpp Series Ep. 116
31:01
Просмотров 3,3 тыс.
I did a C++ University Assignment
50:23
Просмотров 290 тыс.
WHY IS THE HEAP SO SLOW?
17:53
Просмотров 217 тыс.
Fast Inverse Square Root - A Quake III Algorithm
20:08
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 936 тыс.
STL std::set | Modern Cpp Series Ep. 121
24:15
Просмотров 3,4 тыс.
Новый фонарик в iPhone с iOS 18
00:49
Просмотров 440 тыс.