i don’t understand passing of function into another function.
Comparators- Understanding the working
use of passsing comparator is so that the comparisons are done according to compare function made by user
exactly which thing you expect to be explained more?