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
grigory [225]
3 years ago
13

The binary search algorithm:

Computers and Technology
1 answer:
iogann1982 [59]3 years ago
4 0

Answer:

(B) will cut the portion of the array being searched in half each time the loop fails to locate the search value.

Explanation:

The binary search algorithm is a divide and conquer algorithm.It each divides the array in half when it is unsuccessful in finding the answer.It is more efficient than sequential search algorithm.The pre-requisite for binary search to implement is the array should be sorted either in increasing or decreasing order.You can code for array sorted in increasing and decreasing order.

You might be interested in
Describe a situation in a program where you could write and use a "for loop".​
kykrilka [37]

Answer:

  • Use the one that reads most clearly.
  • If you can’t decide, just pick one.
  • If you can’t then use for()
  • If at any point later in time you change your mind, refactor your code.

This is how professionals work. Decide, and for all things with low impact to change, don’t sweat it.

Save that for architectural and API design choices.

Answer#2:

  • Well if you are looking for a simple technique to choose which loop to use you can use these rules.
  • Use for loops when there's a sequence of elements that you want to iterate.
  • Use while loops when you want to repeat an action until a condition changes.

And if whatever you are trying to do can be done with either for or while loops then just choose your favourite :)

8 0
2 years ago
Read 2 more answers
What is the best way to learn JavaScript?
Dafna1 [17]
You can either study it on their site or go to YouTube and go on a full JavaScript video frenzy and watch it for hours...
5 0
3 years ago
Read 2 more answers
A PowerPoint file that contains a theme, sample text, and graphics on the slides or slide background to guide you as you develop
arsen [322]

Answer:

edit

Explanation:

7 0
3 years ago
Read 2 more answers
It is an array containing information such as headers, paths and script locations wherein it is created by the web server itself
Naddik [55]

Answer:

c. $_SERVER

Explanation:

$_SERVER is an array in PHP containing information about headers, paths, and script locations.

Example usage:

echo $_SERVER['HTTP_HOST'];

This will print information about HTTP_HOST header.

echo $_SERVER['DOCUMENT_ROOT'];

This provides information about document root path.

echo $_SERVER['SCRIPT_FILENAME'];

This provides information about the currently executing script.

4 0
4 years ago
How is Boolean logic used in logic gates? Select three options.
tresset_1 [31]

Answer: It would be the last three

Explanation: just did it on edge and got 100%

8 0
3 years ago
Other questions:
  • Quick question... HOW DO YOU FREAKING PUT THE "GREATER THAN EQUAL TO" SYMBOL ON GOOGLE? (sorry i'm frustrated)
    9·2 answers
  • As text is typed in the _____ text box, a drop-down list displays options for completing the action, displaying information on t
    11·1 answer
  • What things have small motors
    13·1 answer
  • According to Ohm's Law current equals what?
    7·2 answers
  • Implement the RC4 stream cipher in C++. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure to discar
    7·1 answer
  • When you create new document, you have the option to create a blank document or a predifined
    7·1 answer
  • What is a google search query that will search for xml files on the domain example.Com
    8·1 answer
  • In every programming language, when you access data stored in an array, it is important to use a ____ containing a value that ac
    15·1 answer
  • What is IBM compadibles
    5·1 answer
  • What are the trinity of the computer system
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!