大家帮忙看看这个程序是怎么运算的
void Paixu(Node *h){
int p, t,m;
Node *q, *r,*head;
head=h;
do
{
p = h->n; q = h; r = h;
do
{
if (r->n < p)
{ p = r->n; q = r; }
r = r->next;
} while (r != NULL);
if (r != h)
{
t = h->n;
m = h->a;
h->n = q->n;
h->a = q->a;
q->n = t;
q->a = m;
}
h = h->next;
} while (h != NULL);
h=head;
}