private void shellSort(int[,] arr)
{
int j;
int step = arr.Length / 2;
for (int k = 0; k < 1; k++)
{
while (step > 0)
{
for (int i = 0; i < (arr.Length - step); i++)
{
j = i;
while ((j >= 0) && (arr[k, j] > arr[k, j + step]))
{
int tmp = arr[k, j];
arr[k, j] = arr[k, j + step];
arr[k, j + step] = tmp;
j -= step;
}
}
step = step / 2;
}
richTextBox1.Text += "\n" + "mas" + (k + 1) + ": ";
for (int y = 0; y < Convert.ToInt32(bunifuMaterialTextbox1.Text); y++)
{
richTextBox1.Text += arr[k, y] + " ";
}
}
}
private void shellSort(int[,] arr)
{
for (int k = 0; k < 2; k++)
{
int j;
int step = arr.Length / 2;
while (step > 0)
{
for (int i = 0; i < (Convert.ToInt32(bunifuMaterialTextbox1.Text) - step); i++)
{
j = i;
while ((j >= 0) && (arr[k, j] > arr[k, j + step]))
{
int tmp = arr[k, j];
arr[k, j] = arr[k, j + step];
arr[k, j + step] = tmp;
j -= step;
}
}
step = step / 2;
}
richTextBox1.Text += "\n" + "mas" + (k + 1) + ": ";
for (int y = 0; y < Convert.ToInt32(bunifuMaterialTextbox1.Text); y++)
{
richTextBox1.Text += arr[k, y] + " ";
}
}
}