Question: int findIndex ( String s , int low, int high ) This method takes as parameters a String, and two indices that indicate the search
int findIndexString s int low, int high
This method takes as parameters a String, and two indices that indicate the search range. It
finds the index of the consecutive pair that begins with the highest order letter alphabetically
eg a is the lowest, and z is the highest If no such pairs exist, return as the index. The
method uses a divideandconquer algorithm to find and return this index. For example, in
string rabhxzdpqrovwa the pairs abpqqr and vw are consecutive pairs first letter is
the immediate predecessor of the second letter and v has the highest order out of ap
q and v so the index of v is returned, which is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
