title: finding the minimum element in a cyclic sorted array
body: <p>I have tried the following code to find out the minimum element in a cyclic sorted array. But it fails when the low = 1 and high =2 because the mid is always 1 and a[mid]=a[1] is always greater than the a[high]. </p>
  
  <p>I am trying to use Binary Search here to find the solution.</p>
  
  <pre><code>//finding the minim element in the cyclic sorted array
  int arrC[]={10,13,1,3,4,5,8};
  int low=0,high =6;
  int mid=0,reset =1;
  while (low &lt; high)
  {
      mid = (low+ high)/2;
      if (arrC[mid]&gt;arrC[high])
      {
          low = mid;
      }
      else if (arrC[mid] &lt; arrC[high])
      {
          high = mid;
  
      }
  }
  printf("minimum element is %d",arrC[mid+1]); 
  </code></pre>