Last active
February 23, 2018 14:32
-
-
Save riffAt2013/b7252ec17d59eb08a18da30e45711805 to your computer and use it in GitHub Desktop.
Method for Exercise 71 from Helsinki MOOC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void smartCombine(ArrayList<Integer> first, ArrayList<Integer> second) | |
{ | |
int i = 0; | |
while (true) | |
{ | |
if (first.contains(second.get(i)) == false) | |
first.add(second.get(i)); | |
i++; | |
if (i== second.size()) break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment