Question: After the first pass through the While loop, what are the values of Low and High? The following pseudocode used to perform a binary search
After the first pass through the While loop, what are the values of Low and High?
The following pseudocode used to perform a binary search of the names "Arnold", "Draper", "Gomez", "Johnson", "Smith", "Wong" (stored in Array), for the name "Gomez". (Assume the array and all the variables have already been declared with their appropriate data types.)

Set N = 5 Set Key "Gomez" Set Low Set High = N Set Index Int (N/2) Set Found While (Found == 0) AND (Low Array[Index] Then Set Low = Index + 1 Set Index = Int((High + Low)/2) End If If Key < Array[Index] Then Set High = Index - 1 Set Index = Int((High + Low)/2) End If End While
Step by Step Solution
3.34 Rating (166 Votes )
There are 3 Steps involved in it
Lo... View full answer
Get step-by-step solutions from verified subject matter experts
