Write a function to find intersection of 2 sorted arrays.
Utilisateur anonyme
void intersection(int* arr1, int* arr2, int len1, int len2, int** res, int& len) { *res = NULL; int i1 = 0; int i2 = 0; len = 0; while(1) { if(arr1[i1] arr2[i2]) && (i2 0) { *res = new int[len]; for(int i=0; (i < len) && (i1+i < len1); i++) (*res)[i] = arr1[i1+i]; } }