Solved sort in algorithms