How should I proceed to turn this piece of code into pseudocode?
ArrayList<Integer> check = new ArrayList<Integer>();
ArrayList<Integer> dup = new ArrayList <Integer> ();
ArrayList<Integer> nonDup = new ArrayList <Integer> ();
for (int i : listA) {
nonDup.add(i);
}
for (int i : listB) {
nonDup.add(i);
}
for (int i : listA) {
check.add(i);
}
for (int i : listB) {
if (check.contains(i)) {
dup.add(i);
nonDup.removeAll(duplicates);
}
}
I have no idea how to turn the for loops, add(), contains() and removeAll() methods into pseudocode.