#include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; int main() { vector <int> temp; temp.push_back(40); temp.push_back(20); temp.push_back(50); temp.push_back(10); cout << "vector list : "; for(auto i:temp ) cout << i << " "; cout << endl; sort( temp.begin(), temp.end() ); cout << "vector list after sort : "; for(auto i:temp ) cout << i << " "; cout << endl; // your code goes here return 0; }