Sort stl function

which sorting algorithm is used in stl sort function and what is the time complexity of stl sort function?

can we use sort(a,a+n,greater()) for descending order sorting of arrays instead of comparators.does this disturb the efficiency(like increase the time complexity) of the program compared to using comparators?

Hey @kani001

There is no fixed algorithm used behind sort function ,its a mix of different algos as far as i know
Also its time complexity is O(nlogn)

Yes u can use that and it wont affect the time complexity