title: Implement stack in such a way so that we can find out minimum in O(1)
body: <p>Interview Question:
  We want to find out minimum element in the stack.
  So, implement stack in such a way it will give me minimum element at any point of time in O(1)
  One more condition, Space Complexity for finding minimum element should be O(1)</p>
  
  <p>Time complexity:</p>
  
  <p>Push operation: O(1)</p>
  
  <p>Pop operation: O(1)</p>
  
  <p>Get Minimum element: O(1)</p>
  
  <p>How to do this ?</p>
  
  <p>For example,
  push(2);</p>
  
  <p><strong>Stack:</strong></p>
  
  <p>2 &lt;- Top</p>
  
  <p><strong>Minimum:</strong> 2</p>
  
  <p>push(3);</p>
  
  <p><strong>Stack:</strong></p>
  
  <p>3 &lt;- Top</p>
  
  <p>2</p>
  
  <p><strong>Minimum:</strong> 2</p>
  
  <p>push(1);</p>
  
  <p><strong>Stack:</strong></p>
  
  <p>1 &lt;- Top</p>
  
  <p>3</p>
  
  <p>2</p>
  
  <p><strong>Minimum:</strong> 1</p>
  
  <p>pop();</p>
  
  <p><strong>Stack:</strong></p>
  
  <p>3 &lt;- Top</p>
  
  <p>2</p>
  
  <p>Minimum: 2</p>