private void button5_Click(object sender, EventArgs e) { string[] x = textBox6.Text.Split(','); int[] nums = new int[x.Length]; for (int counter = 0; counter < x.Length; counter++) { nums[counter] = Convert.ToInt32(x[counter]); } int i = 0; int j = nums.Length; int pivot = nums[0]; do { do { i++; } while ((i < nums.Length) && (nums[i] < pivot)); do { j--; } while (nums[j]>pivot); if (i < j) { int temp = i; nums[i] = nums[j]; nums[j] = temp; } }while(i<j); int temp1 = nums[0]; nums[0] = nums[j]; nums[j] = temp1; int pivotpoint = j; string QuickSort = ""; foreach (var n in nums) QuickSort += n.ToString() + ","; textBox5.Text = QuickSort; }
int temp = i;
int temp = num[i];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)