Program for Sorting Containers Implementation in Stl
Sorting Containers (1) void sort(); (2) template <class Compare> void sort (Compare comp); Sort elements in container: Sorts the elements in the list, altering their position within the container. The sorting is performed by applying an algorithm that uses either operator< (in version (1)) or comp (in version (2)) to compare elements. This comparison shall produce a strict weak ordering…