已知按值递增有序排练的两个线性表A和B,且每个线性表内部各元素互不相同。试构造线性表C,使其是A和B的交集,且其中的数字同样按值递增排列。 要求: 1)分别采用顺序表、单链表、双链表三种数据结构存储上述线性表A、B、C 2)编写一个通用的程序(无论线性表A、B和C采用顺序表、单链表还是双链表存储,该程序完全通用),实现对线性表C的构造-Known to increase the value ordered by the two linear tables A rehearsal and B, and each of the elements within the linear table from each other. Linear table test structure C, it is the intersection of A and B, and the same number of them increasing order by value. Requirements: 1) were used to order table, a single list, double-linked list data structure stored in the linear three tables A, B, C 2) write a generic program (either the linear form A, B and C using the order form, a single list, or double-linked list storage, the program is completely general), to achieve the construction of the linear form C
|