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
Ber [7]
2 years ago
5

What is the maximum number of elements that will be visited by the binary search algorithm when searching a sorted 45-element ar

ray
Computers and Technology
1 answer:
sergey [27]2 years ago
6 0

The max nukber of elements visited will be 6.

You might be interested in
What is blogging
tester [92]
Typically, blogging is online journaling. If you've seen Ask Me Why, she blogs throughout the whole movie and tells those who are watching her blog what is happening in her life. So, the answer is A.
5 0
3 years ago
Read 2 more answers
Write a c++ program to calculate the approximate value of pi using this series. The program takes an input n that determines the
Tanya [424]

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

int main() {

  char choice;

  cout << setprecision(12) << endl;

  while(true) {

      int sign = 1;

      double pi = 0;

      cout << "Enter number of terms: ";

      long n;

      cin >> n;

      for(long i = 1; i < n; i += 2) {

          pi += sign/(double)i;

          sign = -sign;

      }

      pi *= 4;

      cout << "value of pi for n = " << n << " is " << pi << endl;

      cout << "Do you want to try again(y or n)? ";

      cin >> choice;

      if(choice == 'n' || choice == 'N') {

          break;

      }

  }

  return 0;

}

Explanation:

6 0
3 years ago
python This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defi
riadik2000 [5.3K]

Answer:

Check the explanation

Explanation:

arrow_base_height = int(input('Enter arrow base height:\n'))

arrow_base_width = int(input('Enter arrow base width:\n'))

arrow_head_width = arrow_base_width

while arrow_head_width <= arrow_base_width:

   arrow_head_width = int(input('Enter arrow head width:\n'))

print()

for i in range(arrow_base_height):

   for j in range(arrow_base_width):

       print('*', end='')

   print()

for i in range(arrow_head_width):

   for j in range(arrow_head_width-i):

       print('*', end='')

   print()

Kindly check the code output below.

5 0
3 years ago
Read 2 more answers
The _____ contains a series of sections designed to prepare students for the ACT
Studentka2010 [4]
The answer is aspire test 
3 0
4 years ago
Read 2 more answers
In the bremmer article, the author states that _________ translates into greater risks.
blondinia [14]

Answer:

instability

Explanation:

3 0
1 year ago
Other questions:
  • Jack wants to store a large amount of data on his computer. He chooses to use a database for this purpose. What is a database? A
    8·1 answer
  • What is one of the differences between Random Access Memory (RAM) and Read Only Memory (ROM)? RAM is where files are stored, and
    6·2 answers
  • A chef writing up her famed recipe for beef stew realizes she has switched parsley and oregano everywhere in the recipe. The che
    13·1 answer
  • The entire presentation can be seen at a time in __________
    5·1 answer
  • What is the film format that many filmmakers feel is superior to any other format?
    13·1 answer
  • The velocity dimension of Big Data refers to _____.
    15·1 answer
  • Write the definitions for three functions named max. Each receives two parameters, of the same type, and returns the larger of t
    14·1 answer
  • 1. Software that is designed to intentionally cause harm to a device, server, or network is A. outware B.loggerware C.
    12·1 answer
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    15·1 answer
  • Whats 12/29 divided by 12/34
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!