can anyone please help me in the sort function ? i have read that there are 3 way to use sort().
1. use sort(v.begin(),v.end())
and second is sort(v.begin(),v.begin()+n, cmp)
then in cmp i can have 2 varaitions,
2.a : cmp as the function (it is okay with me)
2.b. here , can you tell me that how "operator()" is overloaded ?
like they have declared a struct and then they have overloaded "operator()" . what is this "operator()" ? can you please xplain me? searched it alot but didnt get anything. thanks.