cpp sort int array reverse code example
Example: reverse sort cpp
int main(){
int arr[5] = {1,3,2,4,5};
sort(arr, arr+5, greater<int>());
// arr == {5,4,3,2,1}
return 0;
}
int main(){
int arr[5] = {1,3,2,4,5};
sort(arr, arr+5, greater<int>());
// arr == {5,4,3,2,1}
return 0;
}