Programming Riddles

Re: Programming Riddles

My only suggest would be to pass in two character arrays to SortString by reference and then after sorting use them in your main loop for comparison. This way you won’t have to convert them to string again in SortString function and second you won’t have to use Substring in the main method. It will double the performance of this algorithm.