Week 10 Day 3 - Sets vs. Maps vs. Unordered Maps
Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=epmAyj3iIGI
Today we covered the difference between these classes in the standard library:
1) Set - a balanced BST that uses the comparison operator to sort the nodes in the tree
2) Map - a balanced BST that uses a separate key to sort and search the nodes in the tree. It can also be used like an "associative array" in which you can use non-integers for accessing an array, like calendar["March"] = 31;
3) Unordered_maps - a map that is implemented using a hash table, that has even faster performance than a BST at inserting, searching, and deleting, but does not keep the data in sorted order.
Other Videos By Bill Kerney
Tags:
csci 41
std
c++
data structures
trees
BSTs
set
map
unordered_map