title: How the time complexity of gcd is Θ(logn)?
body: <p>I was solving a time-complexity question on Interview Bit as given in the below image.
  <a href="https://i.stack.imgur.com/YyJcQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YyJcQ.png" alt="enter image description here" /></a></p>
  <p>The answer given is <code>Θ(theta)(logn)</code> and I am not able to grasp how the logn term arrive here in the time complexity of this program.</p>
  <p>Can someone please explain how the answer is theta of logn?</p>