title: Algorithm-finding kth next element in an array
body: <p>I couldn't solve a question can you please help? </p>
  
  <pre><code>For i=1 to i=n/2, if A[i]&lt;=A[2i] and A[i]&lt;=A[2i+1] A is called as a "bst" 
  </code></pre>
  
  <p>What's the time complexity for finding <code>kth</code> smallest element in a <code>bst</code> with n elements? </p>