📄 digui.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace Algorithm
{
class DiGui
{
static public void QuickSort(int[] a,int p ,int r)
{
if (p < r)
{
int q = Partition(a, p, r);
QuickSort(a,p,q-1);
QuickSort(a,q+1,r);
}
}
static public int Partition(int[] a, int p, int r)
{
int temp = a[p];
int x = a[p];
while (p<r)
{
while (p<r&&a[r]>=x) --r;
a[p]=a[r];
while (p<r&&a[p]<=x) ++p;
a[r]=a[p];
}
a[p] = temp;
return p;
}
static public void Swap(int a, int b)
{
int temp;
temp = a;
a = b;
b = temp;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -