title: How to determine big O Time complexity of array difference in Ruby
body: <p>How do I determine big O Time complexity of array difference in Ruby?</p>
  
  <p>For example:</p>
  
  <pre><code>array_1 = [1,2,3]
  array_2 = [5,4,3,2,1]
  
  array_2 - array_1 #gives [5,4]
  </code></pre>
  
  <p>How does <code>array_2 - array_1</code> work and what is the time complexity of it? </p>