How is the sort algorithm in the APP working?

The contacts in this list are presented in format "First name" +  "Last name". 
If the contact list is sorted by "Last name" the order is aligned by First name (e.g. Doe John precedes Doe Lisa).
If the contact list is sorted by "First name" the order is aligned by Last name (e.g. John Doe  precedes Lisa Doe).
: "by last names", inside same last names: "by first names"
.
Contacts with only first names are presented on top of the list
 . Contacts without numbers are not presented in this list. Special characters (e.g. "Ö") are sorted behind the corresponding standard character (e.g. "O").