SyntaxFix
Write A Post
Hire A Developer
Questions
First approach refers:
std::sort(numbers.begin(), numbers.end(), std::greater<>());
You may use the first approach because of getting more efficiency than second. The first approach's time complexity less than second one.