title: How this Java for loop should look like in pseudocode?
body: <p>How should I proceed to turn this piece of code into pseudocode?</p>
  
  <pre><code>ArrayList&lt;Integer&gt; check = new ArrayList&lt;Integer&gt;();
  ArrayList&lt;Integer&gt; dup = new ArrayList &lt;Integer&gt; ();
  ArrayList&lt;Integer&gt; nonDup = new ArrayList &lt;Integer&gt; ();
  
  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);                   
      }
  }
  </code></pre>
  
  <p>I have no idea how to turn the for loops, add(), contains() and removeAll() methods into pseudocode.</p>