title: Calculate time complexity of Ruby Array#uniq own implementation
body: <p>I saw <a href="https://codereview.stackexchange.com/questions/36027/implementing-arrayuniq-in-ruby">this</a>.</p>
  
  <p>I did this with a different arguments:</p>
  
  <pre><code>def uniq(arr)
    out = {}
    arr.each do |el|
      out[el] = nil
    end
    out.keys
  end
  </code></pre>
  
  <p>What is the tie complexity of this code and how can I improve it?</p>
  
  <h1>Update</h1>
  
  <p>What about:</p>
  
  <pre><code>def uniq(arr)
    arr | []
  end
  </code></pre>