Posted inC++
std sort function in C++
https://youtu.be/nq_8aNhxfTs #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> v1 = {1, 6, 2, 5, 10, 4, 11, 3}; sort(v1.begin(), v1.end(), greater<int>()); for (auto el…