Sorting and weird problems

PROBLEMS=BAD.