SyntaxFix
Write A Post
Hire A Developer
Questions
You can either use the first one or try the code below which is equally efficient
sort(&a[0], &a[n], greater<int>());