title: Big O for my binary search algorithm with for loop?
body: <p>I am trying to get my algorithm down to the lowest possible running time.</p>
  
  <p>What is the running time of this algorithm; is it O(log n) or O(n log n) because of the for loop?</p>
  
  <pre><code>import java.util.Arrays;
  
  public class countDifferenceBetweenTwoArrays {
    private static int countDifference(int[] arrayA, int[] arrayB) {
      int differenceCount = 0;
      for (Integer i : arrayA) {
        if (Arrays.binarySearch(arrayB, i) &lt; 0) {
          differenceCount++;
        }
      }
      for (Integer i : arrayA) {
        if (Arrays.binarySearch(arrayB, i) &lt; 0) {
          differenceCount++;
        }
      }
      return differenceCount;
    }
  </code></pre>