Sorting Algorithm - C#