代码搜索结果
找到约 6,623 项符合
L 的代码
算法 3.12.txt
算法 3.12
void RadixSort( SqList &L ) {
// 对顺序表 L 进行基数排序
RcdType C[L.length]; //开设同等大小的辅助空间用于复制数据
i= bitsnum-1;
while ( i >= 0 ) {
RadixPass( L.r, C, L.length,
算法 3.4.txt
算法 3.4
void InsertSort ( SqList &L) {
// 对顺序表L作插入排序
for ( i=2; i
算法 3.5.txt
算法 3.5
void BubbleSort( SqList &L ){
// 对顺序表L作起泡排序,
RcdType W;
i = L.length;
while (i >1) { // i>1 表明上一趟曾进行过记录的交换
lastExchangeIndex = 1;
for (j
算法 3.3.txt
算法 3.3
void InsertPass( Sq<mark>L</mark>ist &<mark>L</mark>, int i ) {
// 已知 <mark>L</mark>.r[1..i-1]中的记录已按关键字非递减的顺序有序排列,本算法实现
// 将<mark>L</mark>.r[i]插入其中,并保持 <mark>L</mark>.r[1..i]中记录按关键字非递减顺序有序
<mark>L</mark>.r[0] = <mark>L</mark>.r[i]; // 复制为哨兵
...
算法 3.1.txt
算法 3.1
void Se<mark>l</mark>ectPass( Sq<mark>L</mark>ist &<mark>L</mark>, int i ) {
// 已知<mark>L</mark>.r[1..i-1]中记录按关键字非递减有序,本算法实现第i趟选择排序,
// 即在<mark>L</mark>.r[i..n]的记录中选出关键字最小的记录<mark>L</mark>.r[j]和<mark>L</mark>.r[i]交换
RcdType W;
j = i; // j 指示关键字最小记录的位置,初值设为 ...
算法 3.2.txt
算法 3.2
void SelectSort (SqList &L) {
// 对顺序表L作简单选择排序。
RcdType W;
for (i=1; i
算法 6.17.txt
算法 6.17
void BSTSort( SqTable &L )
// 利用二叉排序树对顺序表L进行排序
BiTree T = NULL; // 初始化二叉排序树为空树
for ( i=1; i
算法 3.12.txt
算法 3.12
void RadixSort( SqList &L ) {
// 对顺序表 L 进行基数排序
RcdType C[L.length]; //开设同等大小的辅助空间用于复制数据
i= bitsnum-1;
while ( i >= 0 ) {
RadixPass( L.r, C, L.length,
算法 3.4.txt
算法 3.4
void InsertSort ( SqList &L) {
// 对顺序表L作插入排序
for ( i=2; i
算法 3.5.txt
算法 3.5
void BubbleSort( SqList &L ){
// 对顺序表L作起泡排序,
RcdType W;
i = L.length;
while (i >1) { // i>1 表明上一趟曾进行过记录的交换
lastExchangeIndex = 1;
for (j