This forum is closed. Thank you for your contributions.
If you can compromise on the complexity function of the algorithm, Bubble sort should be the best choice.
Other longer methods:
Merge sort
Selection Sort
Insertion Sort
you can also check for the detailed code for the various Data Structures & Algorithms at
http://forums.microsoft.com/SamVaad/ShowPost.aspx?PostID=2439105&SiteID=43