How are comparisons made?

which sorting algorithm is used by sort()? if i use bubble sort and do the comparisons the answer comes out to be
bca abc xy c b a

@Aayush-Bangroo-2654737981474284,
sort() uses intro sort algo which is combination of quick sort, insertion sort and merge sort.
bca abc xy c b a u get when u sort in descending order.
u get same result using bubble sort and sort() but time complexity differs.
Hope dis helps.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.