home
search
help
profile
liking the experience? our app is even better
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now  
showing results for how to sort a vector in descending order c 2b 2b
1int main() 
2{ 
3    // Get the vector 
4    vector<int> a = { 1, 45, 54, 71, 76, 12 }; 
5  
6    // Print the vector 
7    cout << "Vector: "; 
8    for (int i = 0; i < a.size(); i++) 
9        cout << a[i] << " "; 
10    cout << endl; 
11  
12    // Sort the vector in descending order 
13    sort(a.begin(), a.end(), greater<int>()); 
14  
15    // Print the reversed vector 
16    cout << "Sorted Vector in descendiing order:n"; 
17    for (int i = 0; i < a.size(); i++) 
18        cout << a[i] << " "; 
19    cout << endl; 
20  
21    return 0; 
22} 
upvote
downvote
queries leading to this page
how to sort a vector in c 2b 2b reverselysort function in vector in descending order c 2b 2bsort vector in descending order c 2b 2bsort vector in reverse orderc 2b 2b sort vector revershow to sort vector in descending order c 2b 2b objectshow to sort array in descending order in c 2b 2b vectorsort vector in descending order in c 2bhow to sort vector using stl in reversesort vector in decreasing order c 2b 2bc 2b 2b sort vector reversevector sort in descending ordersort vector reversehow to sort vector in descending orderhow to sort in descending order in c 2b 2b using sort function vectordesc sort vectorvector sort reversesort vector c 2b 2b descendingsort a vector in c 2b 2b in decreasing ordersorting a vector in descending ordersort vector in descending order in c 2b 2bvector sort least to greatestc 2b 2b std vector sort descendingsort vector in desending ordervector sort decreasing ordersort vector descending c 2b 2bhow to sort vector in descending order 3fsort descending oreder using sort vectorhow to sort vector array in descending orderordre vector in creverse sort vector c 2b 2bsort vector descendinghow to reverse sort vector in c 2b 2bhow to sort an vector in decresing orderhow to sort vector in descending order in c 2b 2bc 2b 2b reverse sort vectorsort vector by decreasing order c 2b 2bsprt vector in descending ordervector reverse order in creverse sort c 2b 2bsort vector c 2b 2b reversesort a vector in reverse order stlhow to sort vector in reverse order inc 2b 2bc 2b 2b function for descending order vectorhow to sort a vector in descending order using stl in c 2b 2b 3freverse sort a vectorsort in reverse order c 2b 2b vectorsort vector in decreasing order cppsort and reverse vectorc 2b 2b int decreasing orderc 2b 2b vector sort descendingsort a vector in reversesort in descending order vector c 2b 2bsort in descending order vector cppsort vector in descendeing ordeec 2b 2b std sort vector descendingsorting a vector in reverse orderhow to sort vector in desc order in c 2b 2bsort vector in reverse ordersort in decreasing order in vectorhow to sort the vector in descending ordersort vector reverse c 2b 2bvector decreasing orderhow to sort vector within vector in descending ordervector sort in descending order c 2b 2bsort in descending order c 2b 2b vectorcollection sort vector in descending orderhow to sort vector decresing ordersort in decreasing order c 2b 2b vectorcpp sort backwardssort vector using stl in descending orderdescending order sorting in vectorsort c 2b 2b stl vector in descending orderc 2b 2b sort vector in discending ordersort vector in decreasing order using sort 28 29reverse sort vectorreverse sort in c 2b 2b vectorhow to sort a vector in descending order in c 2b 2bsort in descending order vectorsorting vector in descending ordersort vector in decreastig orderc 2b 2b vector descending sortarray sort descending vectorsort vector in reverse order c 2b 2bsorting a vector in descending order c 2b 2bvector sort decreasingdescending sort vectorsort a vector in descending ordersort vector big to smal 3blc 2b 2b vector sort reversealgorithm to sort a vector in descending orderhow to sort in reverse order of vectorin c 2b 2bsort a vector in decreasing orderc 2b 2b sort vector in descenhow to sort vector elements in decreasing orderhow to sort a vector from greatest to leastsort descending c 2b 2b vectorhow to reverse sort a vector in c 2b 2bhow to vector by decreasing orderdescending sort vector c 2b 2bhow to sort vector in reverse ordersort vector descending order c 2b 2b sort vector in decreasing order sort a vector beased on 2nd vectorhow to sort a vector array in decreasing orderorder vector values in descending ordersort vector in descending order using comparatorsort vector in decreasing ordersort a vector in descending order in c 2b 2bsort vector in descending order c 2b 2b in o 28n 29sort vector values in descending orderhow to sort a vector in descending ordervector reverse sortvector sort descendingsort vector in descending ordervector desc sortsort a vector in descending order c 2b 2brepitations in the vector in descending orderhow to sort vector in decreasing irderhow to sort in decreasing order in c 2b 2b vectorsorting vector of pairs in descending ordervector sort in decreasing ordervector sort descending c 2b 2bc 2b 2b sort descending vectorvector sort c 2b 2b descendingstd sort descendingsort reverse vector c 2b 2bsort 1d vector c 2b 2b descendingsorting a vector in descending order in c 2b 2bsorting vector in decreasing orderalgorithm to sort a vector in descending order without stlnumber of repitations in the vector in descending orderreverse sort vector in c 2b 2b stlsort vector in descending order cppc 2b 2b sort vector in descending order