Set of Vectors in C++ STL with Examples
Set in STL Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value of the element cannot be modified once it is added to the set, though it is possible to remove and add the modified value of that element.
Vector in STL Vector is same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by the container. Vector elements are placed in contiguous storage so that they can be accessed and traversed using iterators.
Set of Vectors in STL: Set of Vectors can be very efficient in designing complex data structures.
For example: Consider a simple problem where we have to print all the unique vectors.
Set of Vectors: 1 3 5 7 9 11 13 5 10 15 10 20 30 40