Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to srt vector array

// for #include<bits/stdc++.h> library
// To sort in ascending order
sort(v.begin(), v.end());
// To sort in descending order
sort(v.begin(), v.end(), greater<int>());
 
PREVIOUS NEXT
Tagged: #srt #vector #array
ADD COMMENT
Topic
Name
6+2 =