title: Given a bitonic array and element x in the array, find the index of x in 2log(n) time
body: <p>First, a bitonic array for this question is defined as one such that for some index <code>K</code> in an array of length <code>N</code> where <code>0 &lt; K &lt; N - 1</code> and 0 to K is a monotonically increasing sequence of integers, and K to N - 1 is a monotonically decreasing sequence of integers.</p>
  
  <p>Example: <code>[1, 3, 4, 6, 9, 14, 11, 7, 2, -4, -9]</code>. It monotonically increases from 1 to 14, then decreases from 14 to -9. </p>
  
  <p>The precursor to this question is to solve it in <code>3log(n)</code>, which is much easier. One altered binary search to find the index of the max, then two binary searchs for 0 to K and K + 1 to N - 1 respectively.</p>
  
  <p>I presume the solution in <code>2log(n)</code> requires you solve the problem without finding the index of the max. I've thought about overlapping the binary searches, but beyond that, I'm not sure how to move forward. </p>