Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total = new int[bag.CurrentSize() + anotherBag.CurrentSize()];
- for (int i = 0; i < bag.CurrentSize(); i++) {
- total[i] = bag[i];
- }
- for (int i = 0; i < anotherBag.CurrentSize(); i++) {
- total[bag.CurrentSize() + 1] = anotherBag[1];
- }
- int[] c = new Array.c(bag, anotherBag);
- int[] union = new int[total.CurrentSize() - c.CurrentSize() -1];
- int d = 0;
- for (int i = 0; i <total.CurrentSize; i++){
- for (int k = 0; k < c.CurrentSize; c++){
- if (total[i] ! = c[k]) {
- union[d] = total[i];
- d++;
- }
- }
- }
- return union;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement