To sort an array in increasing order simply write sort(a,a+n).
for sorting in decreasing order use
where a is name of array a[] and n is size of array ;
for sorting in decreasing order use
sort(arr, arr+n, greater<
int
>());
where a is name of array a[] and n is size of array ;