Question: The following is a function definition for a type of search. It search for the key value in i nputList. It will return the

The following is a function definition for a type of search. It search for the key value in i nputList. It will return the location of the value in the list if it is found or -1 if it is not found. Fill in the blank on the line with the while statement with the appropriate code def someSearch(inputList, key): low-0 high len(inputList) - 1 while high low: mid (high+low) // 2 if key inputList[mid]: return mid elif key
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
