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]
2 years 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]2 years 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
Describe the differences and similarities between the most common operating systems used for Mac, PC, and Linux in
melamori03 [73]

Answer:

well the difference is obviously the graphics cards, the fps they can run and many more, of course you can improve these by installing new operating systems compatiable for that system. you can also install graphic cards that dont necissarally go with that computer, another difference is how smoothly they can run certain programms and games.

Explanation:

6 0
2 years ago
Tyra is peer conferencing about her project with a friend. Tyra's friend provided feedback that Tyra does not agree with. What s
natulia [17]

Answer:

Be kind and thankful

Explanation:

If Tyra does not agree with her friend's feedback, she does not have to say it outrightly to her friend. She has to use softer words to disagree. This is where being kind comes in.

Her friend has made efforts by providing this feedback Even if it is not exactly what she wants to hear. It would be polite for her to say thank you.

Then she has to respectfully disagree to avoid coming off as someone who is totally unreceptive of the opinion of others.

6 0
3 years ago
Write a method called removeHighPrice that will go through a provided ArrayList called prices and removes the first price that i
Diano4ka-milaya [45]

Answer:

The method written in Java is as follows:

public static ArrayList<Double> removeHighPrice (ArrayList<Double> prices){

       for(int i =0;i<prices.size();i++){

     if(prices.get(i) > 5.00){

         prices.remove(i);  

         break;

     }

 }

 return(prices);  

 }

Explanation:

This line declares the method

public static ArrayList<Double> removeHighPrice (ArrayList<Double> prices){

This line iterates through the ArrayList named prices

       for(int i =0;i<prices.size();i++){

This checks if current price is greater than 5

     if(prices.get(i) > 5.00){

If yes, the price is removed

         prices.remove(i);  

And the loop is terminated

         break;

     }

 }

This returns the ArrayList

 return(prices);  

 }

<em>I've added as an attachment, the complete program which includes the main method</em>

Download txt
6 0
3 years ago
Which of the following is most likely to be considered plagiarism? a. Intentionally reporting the results of inaccurate statisti
Svetlanka [38]

Answer:

c.

Explanation:

Plagiarism refers to the act of stealing another person's thought, ideas, or expressions. Therefore it can be said that out of all the answers provided the one that is most likely to be considered plagiarism would be using materials from a source without proper citation. This is because you are using another individual's work and not giving them credit for having created that work, instead you are taking credit for it by not citing the actual author.

4 0
3 years ago
Consider the following language:
VMariaS [17]

L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

<h3>How do you know if a language is decidable?</h3>

A language is said to be decidable only when there seems to exists a Turing machine that is said to accepts it,

Here, it tends to halts on all inputs, and then it answers "Yes" on words that is seen in the language and says "No" on words that are not found in the language. The same scenario applies to recognizable language.

So,  L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

Learn more about programming language from

brainly.com/question/16936315

#SPJ1

8 0
2 years ago
Other questions:
  • A ____ is a prewritten formula that is built into excel.
    6·1 answer
  • The trigonometry book says: sin^2(t) + cos^2(t) = 1 Write a Python program that verifies the formula with the help of the Python
    11·1 answer
  • In a case where electrical current leakage from the circuit occurs, the GFCI would do the following:
    10·1 answer
  • The part of the computer that contains the brain or the Central Park nursing unit is also known as
    10·1 answer
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • PrimeFactorization.java: Write a program that begins by reading in a series of positive integers on a single line of input and t
    12·1 answer
  • - Which amongst the following is not a Characteristic of Cloud Computing?
    5·1 answer
  • How to create a network of relevant prospects?
    5·1 answer
  • Convert the following denary numbers into binary using 8-bit register:
    6·1 answer
  • Does anyone have Rblx? if so write your username
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!