⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test02_3.cpp

📁 该包是数据结构的实验软件,来源于合肥工业大学人工智能与数据挖掘实验室,用来实现数据结构.
💻 CPP
字号:
// test02_3
#include "linklist.h"

link  L1,L2,L3:link;
void Interset(link &L1,link &L2,link &L3)
{
	link P1,P2,R,S;
	R=(link)malloc(sizeof(struct node));
	_______________________ //Blank 6
	P1=L1->next;
	P2=L2->next;
	while ((P1!=NULL) && (P2!=NULL)) 
	{
		visite_snode(P1,1);
		visite_snode(P2,2); 
		Wait();
		if (P1->data<P2->data)
		__________________//Blank 7
		else  
			if (P1->data>P2->data)
			____________________ //Blank 8
			else{
				S=(link)mallco(sizeof(struct node));
				S->data=P1->data;
				S->next=NULL;
				__________________________//Blank 9
				P1=P1->next;
				P2=P2->next;
				comput_sllist_card(l3,50,400);
				disp_hsllist("Interset",l3);
			}
	}
}

void main()
{
	get_hsllist(L2); 
	comput_sllist_card(l2,50,250);  
	disp_hsllist("L2",L2);
	get_hsllist(L1); 
	comput_sllist_card(l1,50,100);  
	disp_hsllist("L1",L1);
    Interset(L1,L2,L3);
    comput_sllist_card(l3,50,400); 
    disp_hsllist("Interset",l3);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -