How 3rd argument of sort function works in C++?

Revision en1, by Noor210111, 2023-11-10 18:55:16

In the following sort function of C++ how the 3rd argument is working?

sort(a.begin(), a.end(), [](int x, int y) { return x % 2 < y % 2; });

Tags sorting

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Noor210111 2023-11-10 18:55:16 206 Initial revision (published)