Sort - C++ Reference
Sort elements in range Sorts the elements in the range [first,last) into ascending order. The elements are compared using operator< for the first version, and comp for the second.
Bubble Sort (With Code) - Programiz
Bubble sort is a sorting algorithm that compares two adjacent elements and swaps them until they are not in the intended order.. Just like the movement of air bubbles in the water that rise up to the surface, each element of the array move to the end in each iteration.