Sort using comparator in c++

Revision en1, by __noob___, 2019-04-21 17:02:20

Can anybody tell me how to sort using Comparator in C++ in any specific order what are the condition required for such sorting and also what is the time complexity for sorting using comparator.
Example sort the pairs (1,2),(3,4),(6,10),(7,2) on the basis of if( ( a1 / b1 ) < ( a2 / b2 ) ) then (a1,b1) pair should come first in the order.

Tags comparators

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English __noob___ 2019-04-21 17:02:20 374 Initial revision (published)