After the first pass through the While loop, what are the values of Low and High? The
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 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.)
Transcribed Image Text:
Set N = 5 Set Key "Gomez" Set Low Set High = N Set Index Int (N/2) Set Found While (Found == 0) AND (Low <= High) If Key Array [Index] Then %3D%3D Set Found = 1 End If If Key > 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
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (12 reviews)
Lo...View the full answer
Answered By
JAPHETH KOGEI
Hi there. I'm here to assist you to score the highest marks on your assignments and homework. My areas of specialisation are:
Auditing, Financial Accounting, Macroeconomics, Monetary-economics, Business-administration, Advanced-accounting, Corporate Finance, Professional-accounting-ethics, Corporate governance, Financial-risk-analysis, Financial-budgeting, Corporate-social-responsibility, Statistics, Business management, logic, Critical thinking,
So, I look forward to helping you solve your academic problem.
I enjoy teaching and tutoring university and high school students. During my free time, I also read books on motivation, leadership, comedy, emotional intelligence, critical thinking, nature, human nature, innovation, persuasion, performance, negotiations, goals, power, time management, wealth, debates, sales, and finance. Additionally, I am a panellist on an FM radio program on Sunday mornings where we discuss current affairs.
I travel three times a year either to the USA, Europe and around Africa.
As a university student in the USA, I enjoyed interacting with people from different cultures and ethnic groups. Together with friends, we travelled widely in the USA and in Europe (UK, France, Denmark, Germany, Turkey, etc).
So, I look forward to tutoring you. I believe that it will be exciting to meet them.
3.00+
2+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What are the values of (a) 12 8, (b) 35 / (7), (c) (24 8) (4 + 5), (d) (18 4) / (3 + 9 5), (e) (22/11) (18 + 3) / (12/4)?
-
The Wilcoxon signed-rank test can be used to perform a hypothesis test for a population median, , as well as for a population mean, . Why is that so?
-
What are the two basic approaches used to perform a distributed route computation, and how does each work?
-
Find a and b if, y= ax+b has mean 6 and variance is unity, where x is a random variable with mean 8 and variance 16.
-
What are the purposes of a pleading?
-
Which standard of scrutiny, or test, would apply to this situation? Why? A state legislature enacted a statute that required any motorcycle operator or passenger on the states highways to wear a...
-
8. ROLE REVERSAL Write a short-answer question that focuses on the elements of a RICO violation.
-
The intangible assets section of Glover Company at December 31, 2013, is presented below. Patents ($60,000 cost less $6,000 amortization) ....... $54,000 Franchises ($48,000 cost less $19,200...
-
Good afternoon, can you please help me fill out G1 - G9 on this calculation for Business Activity Statement in Australia? Like G1 for Total Sales, G2 for Export Sales, etc. The following numbers for...
-
A Cold Inc. is a frozen food distributor with 10 warehouses across the country. Iven Tory, one of the warehouse managers, wants to make sure that the inventory policies used by the warehouse are...
-
How many passes are made through the While loop? The following pseudocode used to perform a binary search of the names "Arnold", "Draper", "Gomez", "Johnson", "Smith", "Wong" (stored in Array), for...
-
On entering the While loop for the first time, what is the value of Index? The following pseudocode used to perform a binary search of the names "Arnold", "Draper", "Gomez", "Johnson", "Smith",...
-
Find all functions f(t) that satisfy the given condition. f'(t) 4 6 + t
-
Read Burkenroad report regarding POOL in 2022. Briefly summarize the investment thesis. What valuation methods are used in the report? What issues do you see in the valuation? Read Burkenroad's...
-
A Michelson interferometer is used to measure the wavelength of light emitted from a monochromatic source. As the adjustable mirror is slowly moved through a distance DA = 0.0265 mm, an observer...
-
Using the business rules and completed ER Diagrams. complete a Transaction Analysis and a CRUD Diagram for the case. If additional assumptions are made for your case to complete any aspect of this...
-
6. (8 points) A spooky ghost is spotted initially <3, 1 > blocks from a haunted house. After 50 seconds later, the spooky ghost was spotted < -2, -3 > blocks away from the same haunted house. A...
-
In an action movie, an actor runs at 8.0 m/s from a car explosion. If the explosion accelerates the actor 4.0 m/s for 2.2 s, how far will he travel due to the explosion?
-
The manager of Specialty Paper Products Company was agonizing over an offer for an order requesting 5,000 calendars. Specialty Paper Products was operating at 70 percent of its capacity and could use...
-
Stephen Schor, an accountant in New York City, advised his client, Andre Romanelli, Inc., to open an account at J. P. Morgan Chase Bank, N.A., to obtain a favorable interest rate on a line of credit....
-
What are the user data rates of STS-3, STS-9, and STS-12?
-
What is the purpose of the pointer in the line overhead?
-
Show how STS-9s can be multiplexed to create an STS-36. Is there any extra overhead involved in this type of multiplexing?
-
Understanding the external business environment requires marketers to be aware of: O changes in the law which impact how business is conducted O their customers' wants and needs O how employees are...
-
Data Warehouses are primarily used to manage the current and timely operational data. True False SUBMIT
-
A customer's personal philosophy is an influence on his/her adequate service expectations. True False
Study smarter with the SolutionInn App