kClistCore.c
inline unsigned merging(unsigned *list1, unsigned s1, unsigned *list2, unsigned s2,unsigned *list3){
	unsigned i=0,j=0,s3=0;
	unsigned x=list1[0],y=list2[0];
	while (i<s1 && j<s2){
		if(x<y){
			x=list1[++i];
			continue;
		}
		if(y<x){
			y=list2[++j];
			continue;
		}
		list3[s3++]=x;
		x=list1[++i];
		y=list2[++j];
	}
	return s3;
}
//store the intersection of list1 and list2 in list3 and return the size of list3 (the 3 lists are sorted)
store the intersection of list1 and list2 in list3 and return the size of list3 (the 3 lists are sorted)
store the intersection of list1 and list2 in list3 and return the size of list3 ( the 3 lists are sorted )
inline unsigned merging(unsigned *list1, unsigned s1, unsigned *list2, unsigned s2,unsigned *list3){
	unsigned i=0,j=0,s3=0;
	unsigned x=list1[0],y=list2[0];
	while (i<s1 && j<s2){
		if(x<y){
			x=list1[++i];
			continue;
		}
		if(y<x){
			y=list2[++j];
			continue;
		}
		list3[s3++]=x;
		x=list1[++i];
		y=list2[++j];
	}
	return s3;
}
inline unsigned merging ( unsigned * list1 , unsigned s1 , unsigned * list2 , unsigned s2 , unsigned * list3 ) { unsigned i = 0 , j = 0 , s3 = 0 ; unsigned x = list1 [ 0 ] , y = list2 [ 0 ] ; while ( i < s1 && j < s2 ) { if ( x < y ) { x = list1 [ ++ i ] ; continue ; } if ( y < x ) { y = list2 [ ++ j ] ; continue ; } list3 [ s3 ++ ] = x ; x = list1 [ ++ i ] ; y = list2 [ ++ j ] ; } return s3 ; }
store the intersection of list1 and list2 in list3 and return the size of list3 (the 3 lists are sorted)
store the intersection of list1 and list2 in list3 and return the size of list3 ( the 3 lists are sorted )