n = 5; head = 0
a = [[None, 1], [50, 2], [30, 3], [10, 4], [20, 5], [30, -1]]
for i in range(n-1):
r = head
p = a[r][1]
q = a[p][1]
while q != -1:
if a[p][0] > a[q][0]:
a[r][1] = q
①
a[q][1] = p
r = a[r][1]
p = a[r][1]
②
# 从head指针的下一个节点开始输出链表,结果为有序序列,代码略
划线处应该填写的语句是( )