How to bubble sort a string array?
问题 public void BubbleSortArrayString(string[] letters) //change here { bool swap; string temp; //change this too do { swap = false; for (int index = 0; index < (letters.Length - 1); index++) { if (letters[index] > letters[index + 1]) //if first number is greater then second then swap { //swap temp = letters[index]; letters[index] = letters[index + 1]; letters[index + 1] = temp; swap = true; } } } while (swap == true); } I have managed to bubble sort a decimal but I'm suck with a string, I have a