Temporary Stage 4

Why function sort() doesn`t work correctly ?