SHARE
TWEET

Untitled

a guest Feb 27th, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void torles(int* array, int* b, int n, int m) {
  2.     int last = n, swap, nr = 0;
  3.     for (int i = 0; i < n; i++)
  4.         for (int j = 0; j < m; j++)
  5.             if (array[i] == b[j])
  6.             {
  7.                 swap = array[i];
  8.                 array[i] = array[last];
  9.                 array[last] = swap;
  10.                 last--;
  11.                 nr++;
  12.             }
  13.     array = (int*)realloc(array, n - nr);
  14.     return array;
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top