实现两个集合a,b交集的算法?
实现两个集合a,b交集的算法,
typedef struct node{
int data;
struct node *next;
} snode;
snode * setintersection(snode * a, snode * b)
{
snode *c,*p;
c=NULL;
while(a) /*verify wether the elements of SET a is in SET b or not*/
for(p=b;p&&p->data!=a->data;p=p->next);
…….
snode * setintersection(snode * a, snode * b),怎样理解结构体指针的函数(我不知道是否该这么说);另外对for(p=b;p&&p->data!=a->data;p=p->next);中的p&&p->data!=a->data如何理解?