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: std::set
NOTES:
1. std::set is an Associative Container that contains a sorted set of unique objects of type Key.
2. It is usually implemented using Red-Black Tree.
3. Insertion, Removal, Search have logarithmic complexity.
4. If we want to store user defined data type in set then we will have to provide
compare function so that set can store them in sorted order.
5. We can pass the order of sorting while constructing set object.
BOTTOM LINE:
It store unique elements and they are stored in sorted order (A/D)
#SETSTL #STLCpp #STDSET #CppNuts
Tag: set c++, set, container, stl, std::set, standard template library, c++, c++ tutorial, stl c++, sorting, associative containers c++, set in c++, how to use set in c++, template in c++, multiset in c++, multiset, c++ programming, sort, data structures, programming, coding, c++ interview, c++ coding, c++ tutorial for beginners
Xem Thêm Bài Viết Về Mẹo Hay Khác: https://meocongnghe.vn/meo-hay
Nguồn: https://meocongnghe.vn
Correct me if i am wrong. If we have raw pointers as data members in our class, then we have to overload "operator==" because if we don't, the compiler will compare the pointer and not what it is pointing to and hence store it in the set, right?
best in class !
could you please explain 25 line of code
so nicely explained! Thank you so much! 😀
0:57 the syntax used in for loop is valid in C++14 ?…. Extremely nice explaination 👌 and ajj pata chala app INDIAN ho 😂😍
God<Bless> You;
More info and a clear explanation. You're the best in doing this.
sir which ide you use for coding.
Thank you so much for creating this video! It was very clear, easy and enjoyable! Good luck and you've won me as a subscriber 🙂
please drop your accent it is irritating
Can you just describe about 'for(const auto&e: Set)'
Thnks man
superbb explanation …! set< int , greater<int> > for descending order
Man the video was great why do you so many ads . They suckkk!!!
Pls. Explain Comparator and how we can define them in cpp file!!!!
why did they write const in front of return statement and in front of person& rhs
bool operator < (const Person& rhs) const {return age < rhs.age;}
bool operator < (const Person& rhs) const {return age< rhs.age;}
can you please explain why "const {…}" -> const is used? what is the need to use that?
Thank you very much for this explanation. The operation overloading part wasn't so clear but you explained the concept of Set very well. You earned a subscriber and deserve many more. Keep uploading great content, Rupesh!
can anyone explain what is this return{age<rhs.age};
What is the use of lines 25,26 in the code , and you haven't made any explanation regarding those two lines(not the const part , it is the bool part)! I haven't understood what is being done there….!!! respond ASAP!!!!
are you overloading < operator?
Why "pair" is not a Associative Container ?? 🧐🧐
Can somebody explain the loop const auto &e. Why it is const? And why we are reference variable?
can any one tell me where i can read about this i didn't understand this …..
bool operator < (const Person& rhs) const {return age<rhs.age;}
Hi, Your video is really good, but one thing why are you trying to make western accent.
Damnn I love those videos, they are really in depth and so damn clear!! Thanks a lot for your time man!
I didn't understood how you used bool operator and what is this Person& rhs. Please explain .
hey man,
is there any container that provides uu-order feature such that order should not change at all ,if i am taking 7,3,1,4,2,9,10…..it should print exactly same 7,3,1,4,2,9,10?
what is bool operator <(const……explain that?