Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Guide: Allow 3 0 minutes for this challenge. The procedure By following a special series of instructions ( the procedure ) it is possible to
Guide: Allow minutes for this challenge. The procedure By following a special series of instructions the procedure it is possible to find ant value in a list of venues that are sorted in ascending order. This is a useful procedure. In the procedure you will see reference to special keywords: Items, Nemo, Focus, Position and Count. In the procedure each of these keywords actually represent a value, and the value might change during the procedure. You should make a note of the value of each keyword, and update your notes each time these values change. Here is a suggested method for keeping track of the keyword values: Use a table like the one below with a column for each keyword. The procedure changes the value in a keyword by making a statement like "Count is This means you should place in the Count column, in the first row, as in the example below. if the value later changes, write it onto next row in the same column. The current value in the keyword will always be the last entry in that column. Items Nemo Focus Position Count Part Fix the procedure But I left the paper with the procedure in my pocket when my jeans were washed, and now some details have been erased or smudged. The procedure I now have is listed below, and the parts that cannot read are marked like this: Please fill answers in on these lines. Items is the number of items in the List. Nemo is the Value of an item to be found. Count is Focus is PositionItem divided by focus, rounded to an integer. Skip to Position in the list If Nemo is equal to the value at Position, then go to line Increase Count by If Focus is less than Items, then double the value of Focus. If Nemo is less than the value at Position, then go to line If Nemo is greater than the value at Position, then go to line Position is Position minus Items divided by Focus, rounded to an integer Go to line Position is Position minus Items divided by Focus, rounded to an integer Go to line Report "Found Nemo in List at Position after Count attempts". Part Finding Nemo Using the method you created in Part : consider the following list of values: How many attempts will it take to find in this list? How many attempts will it take to find in this list? What is the maximum number of attempts to find any value in the list? How many attempts do you need to find any value in a list of: o items? items? items? Scratch patch Items Nemo Focus Position Count Items Nemo Focus Position Count Items Nemo Focus Position Count
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started