您的位置:首页 > 理论基础 > 数据结构算法

数据结构与算法分析-C语言描述 3.2

2017-12-14 20:36 411 查看
数据结构与算法分析-C语言描述 3.2  PrintLots

#include "stdafx.h"
#include"List.h"

int main()
{
List L, P;
L = CreatedList();
P = CreatedList();
PrintLots(L, P);
return 0;
}
//3.2
void PrintLots(List L, List P) {
Position l_pos, p_pos;
l_pos = L;
p_pos = P;
int i = 1;
while (p_pos != NULL&&l_pos != NULL) {
int num = Retrieve(p_pos);
for (; i < num; i++) {
l_pos = Advance(l_pos);
}
printf("%d\n", Retrieve(l_pos));
p_pos = Advance(p_pos);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐