📄 chainselsort.cpp
字号:
void ChainSelSort(Chain*& head)
{
Chain *t,*s,*tail,*u,*v;
s=NULL;
while (head!=NULL)
{
for (t=u=head;u->next!=NULL;u=u->next)
if (u->next->data<t->data)
{
v=u;
t=u->next;
}
if (t==head)
head=head->next;
else
v->next=t->next;
if (s==NULL)
tail=s=t;
else
{
tail->next=t;
tail=tail->next;
}
}
if (s!=NULL)
tail->next=NULL;
head=s;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -