I want need help to understand sorting using comporator function in c++

Please help anyone with valid explain