Sometimes Prateek bhaiya uses a custom comparator function. Sometimes he uses a custom comparator class with operator overloading on ( )
For example,
He used custom comparator Function while calling the sort function of STL,
He used custom comparator Class while creating his own generic search function.
How to decide what is to be used when?