Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1.  
  2.         total = new int[bag.CurrentSize() + anotherBag.CurrentSize()];
  3.         for (int i = 0; i < bag.CurrentSize(); i++) {
  4.             total[i] = bag[i];
  5.             }
  6.         for (int i = 0; i < anotherBag.CurrentSize(); i++) {
  7.             total[bag.CurrentSize() + 1] = anotherBag[1];
  8.             }
  9.             int[] c = new Array.c(bag, anotherBag);
  10.             int[] union = new int[total.CurrentSize() - c.CurrentSize() -1];
  11.             int d = 0;
  12.             for (int i = 0; i <total.CurrentSize; i++){
  13.                 for (int k = 0; k < c.CurrentSize; c++){
  14.                     if (total[i] ! = c[k]) {
  15.                     union[d] = total[i];
  16.                     d++;
  17.                 }
  18.             }
  19.         }
  20.         return union;
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement