recursion recursive binary search remember the binary search we discussed in "arrays"we wanted to find given cell in an ordered array using the fewest number of comparisons the solution was to divide the array in halfsee which half the desired cell lay individe that half in half againand so on here' what the original find(method looked like//public int find(long searchkeyint lowerbound int upperbound nelems- int curinwhile(truecurin (lowerbound upperbound if( [curin]==searchkeyreturn curin/found it else if(lowerbound upperboundreturn nelems/can' find it else /divide range if( [curinsearchkeylowerbound curin /it' in upper half else upperbound curin /it' in lower half /end else divide range /end while /end find(/you might want to reread the section on binary searches in ordered arrays in which describes how this method works alsorun the ordered workshop applet from that if you want to see binary search in action we can transform this loop-based method into recursive method quite easily in the loop-based methodwe change lowerbound or upperbound to specify new range and then cycle through the loop again each time through the loop we divide the range (roughlyin half recursion replaces the loop in the recursive approachinstead of changing lowerbound or upperboundwe call find(again with the new values of lowerbound or upperbound as arguments the loop disappearsand its place is taken by the recursive calls here' how that looks