JOIN ME:
youtube ►
patreon ►
play list for smart pointers:
play list for STL:
play list for C++14:
play list for Threads In C++:
play list for C++ Interview Questions And Answer:
play list for C++ Tutoria For Beginners:
paly list for Design Patterns:
play list for Linked List Interview Questions:
play list for Data Structures:
play list for Type Casts:
paly list for Sorting Algorithms:
TOPIC: Map In C++
NOTES:
1. std::map is associative container that store elements in key value combination
where key should be unique, otherwise it overrides the previous value.
2. It is implement using Self-Balance Binary Search Tree (AVL/Red Black Tree) .
3. It store key value pair in sorted order on the basis of key (assending/decending).
4. std::map is generally used in Dictionay type problems.
#MapSTL #STLCpp #CppNuts
Nguồn: https://ephraimturner.com
Xem thêm bài viết khác: https://ephraimturner.com/cong-nghe/
Xem thêm Bài Viết:
- Adobe Media-Encoder là gì? Top cấu hình máy tính chạy Adobe Media-Encoder
- Phần mềm CRM xu hướng chuyển đổi số phát triển mạnh mẽ
- Vị trí căn hộ Đồng Nai và kinh nghiệm mua căn hộ
- Metamask là gì? Hướng dẫn đăng ký tài khoản Metamask cụ thể nhất
- Giới thiệu Website đánh giá sản phẩm uy tín Danhgiatot.vn
thank u so much for putting out such good quality videos on stl.
Can you expand on the comparison of data within two different objects? You mentioned a function. value_comp is exclusively for comparisons within the same object? I am not sure where you were going with that.
Hello Sir ! I didn't understand meaning of auto&ell : m . Anybody help me for explanation.
Bro could you make a tutorial on map-filter-reduce in stl ?
at 2:01 you said, same same cannot have different values, but at 13:14 how , the key Amit has different values. :/
Thank you youtube algorithms for suggesting this video, just what I wanted, subscribed… liked…
that cleared my concept on maps
An alternative is Map.insert({"LilSyntax",888}) for your example… The argument is a simple example of std::initializer_list<T> … This is a briefer syntax. std::make_pair is not always necessary today.
I had a doubt but my program clarified .what if the key is string and the key Value is "aBC" "ABC" . Are these same or different and insert into the map.It is inserted
Simple and amazing
1)map template structure 2)map<key,value> key should be unique. different way to insert the values in map a)Map.insert(std::make_pair(key,value)) b)Map.insert(std::pair<K,T>(key,value)) c)Map[key] ; in this case value will be default 3)How map is Internally implemented. self balance search tree how to traverse In-order 4) By default map is ordered in Ascending, If we want to sort in descending order we need to use map<int,string,greater<>>Map. You used vector as value. Value can be anything.Vector or map or any object. Probably, you could have included the time complexity of inserting the element although most people know it.
I am following ur videos, and they r really helpful.Thanks for that.
But i want to ask u when r u uploading Data Structures videos?
Kindly do it soon..👍
But ultimately there are two values for one key. How?
Hello Rupesh! Generally speaking all your videos are very useful and carefully done! The content is also great. I am very glad of being the member if your channel. It will be also great to present, beside "the theory" some small projects to utilize the theory in practice. Anyway., please continue your channel. Keep fingers for you!
That's a great insight☺️. Please cover the working of unordered_map/unordered_set also in next videos. Reason I am asking this because i have tried to understand about how the collisions are handled in these unordered associative containers but still not sure how it is done exactly. It will be great if you can give some insights, from the time complexity point of view also.