Question: The sequential search algorithm of Figure 2.13 doesn't work when the numbers in the reverse directory are not unique. For example, if Raj is listed
on. @The Sequentia LA-Assignment /DInvitation toexeSharedwith mGw y/Downloads/GMichael%20Schneider%20Judith%20Gersting-Invitation%20to%20Computer%20Science-Cour Chapter 2Algorithm 1 FIGURE 2.13 Step Operation 1Get values for NUMBER., Thoao and N,.N.00 Set the value of i to 1 and set the value of Found to NO While botdFound = NO)and (i 10,000) do Steps 4 through 7 If NUMBER is equal to the ith number on the list, T, then Print the name of the corresponding person, N Set the value of Found to YES Else (NUMBER is not equal to T) Add 1 to the value of i 7 8 If (found = NO)then Print the message Sis umber is not in the direc 10 Stop The sequential search algorithm (which is not actually a valid telephone number according to the North American Numbering Plan that covers the United States, Canada, and many Caribbean islands). In all likelihood, a communications company located in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
