We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在一本算法结构的书中,介绍的快速排序,每一趟排序都会去交换。 但这里的好像只是找到了比基准值大的和小的两个数组,然后最后再去合并。 书上的c的实现: `int Quick(List R, int low, int high) { x=R[low];
while(low<high) { while((low<high) && R[high].key >= x.key) { high --; } R[low] = R[high]; while(low<high && R[low].key <= x.key) { low++; } R[high] = R[low]; } R[low] = x; return low;
}
void QuickSort(List R, int low, int high) { if (low < high) { temp = Quick(R, low, high); QuickSort(R, low, temp - 1); QuickSort(R, temp + 1, high); } }`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在一本算法结构的书中,介绍的快速排序,每一趟排序都会去交换。
但这里的好像只是找到了比基准值大的和小的两个数组,然后最后再去合并。
书上的c的实现:
`int Quick(List R, int low, int high)
{
x=R[low];
}
void QuickSort(List R, int low, int high)
{
if (low < high)
{
temp = Quick(R, low, high);
QuickSort(R, low, temp - 1);
QuickSort(R, temp + 1, high);
}
}`
The text was updated successfully, but these errors were encountered: