Flow of control

when we are calling a function inside the in built sort function is the sorting is happening inside that function?
or what exactly is the flow of control there.

Hey @ashishxmathew sort() takes a third parameter that is used to specify the order in which elements are to be sorted.
We can also write our own comparator function and pass it as a third parameter. This “comparator” function returns a value; convertible to bool, which basically tells us whether the passed “first” argument should be placed before the passed “second” argument or not.