title: Binary search 1/4 modification
body: <p>My task is to write 1/4 - 3/4 binary search algorithm modification wherein the first element compared, when searching for  an item in the list, is the 'pivot' element which is at a distance of 1/4th from 
  one end of the list(assuming the end chosen is the start of the 'remaining' 
  list). If there is no match ('pivot' element is not equal to the search key) and 
  if the part of the list that should be examined further for the search is 1/4th 
  part of the list, continue with the same strategy. Whenever the part of the 
  list that should be examined further for the search is of size 3/4th, switch to 
  a binary search once and return to the 1/4th-3/4th strategy.
  My code is here, but it doesnt work, and i dont know even if i am doing it right:</p>
  
  <pre><code>public static int ThreeFour(int[] Array,int item)
      {
         int counter =0;
         int high=Array.length-1;
         int low=0;
         int pivot = 0;
  
         boolean split = true;
         boolean last =true;
  
         while(high &gt;= low) {
        if(split){
             pivot = (high+low)/4;
             last=true;}
         else
        {  pivot = (high+low)/2;
           split=true;
           last=false;
        }   
  
           if(Array[pivot] == item) 
           {  counter++;
           System.out.println("Pivot"+pivot);
           return counter;
           }
  
           if(Array[pivot] &lt; item) {
            low = pivot + 1;
            counter++; 
           }
  
           if(Array[pivot] &gt; item) {
            high = pivot - 1;
            counter++;
            if (last)
                split=false;
           }
         }
           return 0;   
      }
  </code></pre>
  
  <p>It doesnt work, maybe there is a simplier strategy to do that? The hardest part is to make it remember that it already splited in half once:/</p>