title: Data structure - Check if array contain 2 integers that the first one is bigger by 2 times from the second one
body: <p>I wanted to know if there is a way to check if an array contain 2 integers (integer > 0) that the first one is exactly 2 times from the second.</p>
  
  <p>e.g: </p>
  
  <pre><code>44 6 2 5 9 22 5 3 4 31 
  </code></pre>
  
  <p>2 and 4 should return true.</p>
  
  <p>How can I do it in time complexity of O(n)? </p>