Suri

Suri

  • NA
  • 113
  • 13k

what is the diffrence between sort and stable_sort i am getting same r

Jul 4 2021 5:35 AM

what is the diffrence between sort and stable_sort i am getting same result in both

stable_sort(begin(arr), end(arr), x{                                                                                
            return abs(a - x) < abs(b - x);                                                                                                           
        });                 can someone explain this what that [x] means here

 


Answers (1)