Compare function confusion

in my comapre function if we pass comapre(a,b)
then while returning
if we want to be sorted lexiographically tehn we return a<b
return a<b;
what does that exactly means
what if i return b<a
plzz clear my doubt
how is it actually understood by compiler

hey @yatin, Compare function takes out pairs from the array and compare them as specified. Taking all pairs and performing the its operation will sort Complete array. Now which pairs it is considering that is totally the internal computation of compiler, Even if you want to see the pairs you can use simple cout statement cout<<a<<" "<<b<<endl;.

comapre(a,b), a is first argument and b is second, a< b means sorting is increasing order and a > b means sorting is in decreasing order.