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?
-
7 9 Armstrong Corporation manufactures bicycle parts. The company currently has a $ 2 1 , 0 0 0 inventory of parts that have become obsolete due to changes in design specifications. The parts could...
-
Source Today earned net income of \(\$ 60,000\) after deducting depreciation of \(\$ 4,000\) and all other expenses. Current assets decreased by \(\$ 3,000\), and current liabilities increased by...
-
Using the future value tables, solve the following: Required 1. What is the future value on December 31, 2011 of a deposit of $35,000 made on December 31, 2007 assuming interest of 10% compounded...
-
1. At the beginning of current the year, an entity purchased 40% of the outstanding ordinary shares of another entity for P3,500,000 when the net assets of the investee amounted to P7,000,000. At...
-
Each December the incoming members of the board of directors of the National Association of Accountants (NAA) met in joint session with the outgoing board as a means of smoothing the transition from...
-
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",...
-
The author surveyed one of his statistics classes. The numbers of units (hours or credits) students were enrolled in are shown in Table 28. a. Construct a histogram. Begin with lower class limit 4...
-
How do patterns of urbanization and globalization impact social structures, and what challenges do these trends pose for governance and social cohesion ?
-
1. (15 points) You did so well selling concert tickets that you've been put in charge of organising the next concert. Specifically, you need to book a musical act and decide on the ticket price. If...
-
Instructions - President Theater 38518DL Questions will be taken in the Student Lounge Discussion Group 1Enter Your Name Right Here, in Cell B3 - NOW This will put your name on all the pages S22 Save...
-
How do sociological theories interpret the ongoing trends toward secularization, and what impact does this have on traditional religious institutions ?
-
Review the article MSU Donations Drop 25%; NassarEffect Uncertain Addresses the following: You are a member of the External/Donor Relations team at Michigan State University. What would be your...
-
Suppose the following bond quote for IOU Corporation appears in the financial page of today's newspaper. Assume the bond has a face value of $1,000, semiannual coupon payments, and the current date...
-
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?
-
Show evidence how a community support worker implement strategies to foster and promote diversity in work practices to include the following: 1. Coaching and mentoring 2. Communication 3. Work...
-
Determine the domian of analyticity for f(z) = Log(4 + i 2). Compute f'(:).
-
Discuss a minimum of three (3) core components of Grievance Procedures within aviation labor relations and analyze how this can benefit the relationship between union labor and management.
Study smarter with the SolutionInn App