1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zloy xaker [14]
1 year ago
5

The sorted values array contains the sixteen integers 1, 2, 3, 13, 13, 20, 24, 25, 30, 32, 40, 45, 50, 52, 57, 60. How many recu

rsive calls are made by our binarySearch method given an initial invocation of binarySearch(45, 0, 15)
Computers and Technology
1 answer:
Licemer1 [7]1 year ago
6 0

The number of recursive calls that have to be done using the binary search is 4.

<h3>How to do the recursive calls</h3>

binarySearch = (45, 0, 15)

start + end / 2 = value

mid = 0 + 15/2 = 7.5

The 7th element = 30

30 is less than 45

8 + 15/3

= 23/2 = 11.5

The 12th element = 52

52 is greater than 45

8 + 11/2

= 19/2 = 9.5

The value of 9 = 40 and 40 is less than 45

10+ 11/2 = 10.5

The tenth value is 45 hence the iteration to be done is 4.

Read more on binary here:

brainly.com/question/21475482

#SPJ1

You might be interested in
Need help!! Write an interactive program that reads lines of input from the user and converts each line into "Pig Latin." Pig La
zepelin [54]

<span>user input a elit Interactive legentium lineae ad lineam convertit et "Sus
</span>
6 0
2 years ago
The ____number system is base 10​
evablogger [386]

Answer:

The correct answer to this question is given below in the explanation section.

Explanation:

This is a fill-in-blank question.

The answer is:

The decimal number system is base 10.

In our everyday life, we use a number system that is a Base-10 system. As we know that the base-10 is known as the decimal system and this number has 10 digital starting from 0 to 9 such as:

0,1,2,3,4,5,6,7,8,9

We use this number system in our daily accounting and in daily life and it is a base-10 number system. This number system uses 10 as its base number so it is called a base-10 system. It is also called the decimal number system.

7 0
3 years ago
True or false: You buy a new game for your smartphone, and instead of going through the tutorial, you learn how the game works j
stealth61 [152]

Answer: i think it is true because i have  heard of that saying before with my friends i am a pc expert i know lots about them

Explanation: i heard the saying before

4 0
2 years ago
What is often called the brain of a computer
Nookie1986 [14]

Answer:

Explanation:

The computer brain is a microprocessor called the central processing unit (CPU)

6 0
2 years ago
13. Executive Producers find the cast prime for the programme . <br> a . True <br> b. False
Shalnov [3]

Answer:

a . True

Explanation:

7 0
1 year ago
Other questions:
  • Assume that an int variable age has been given a value. Assume further that the user has just been presented with the following
    14·1 answer
  • You have received several trouble tickets from the employees in the warehouse for the stand-alone computers used to control vari
    14·1 answer
  • Yesterday you installed a new game on your computer. When you ran the computer, you noticed that the application was running ver
    8·1 answer
  • A short circuit locator should be periodically run along the cords used in a shop to check for shorts and open circuits. A.)True
    12·2 answers
  • In an attack known as ____, valid protocol packets exploit poorly configured dns servers to inject false information to corrupt
    12·1 answer
  • What does the CPU do in a computer?
    7·2 answers
  • Anyone help pls ? Complete the code below to add css to make the background of the web page orange.
    10·1 answer
  • python An instance variable named counter of type int An instance variable named limit of type int. A constructor that takes two
    15·1 answer
  • Which statement opens a text file so that you can retrieve the information it contains?
    14·1 answer
  • Q1) Convert the decimal number 67 to binary?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!