What are the four steps of the binary search algorithm

Answers

Answer 1

Answer:

Step 1 - Read the search element from the user.

Step 2 - Find the middle element in the sorted list.

Step 3 - Compare the search element with the middle element in the sorted list.

Step 4 - If both are matched, then display "Given element is found!!!" and terminate the function.

Answer 2

Answer:

These are the main steps are given the photo below

I hope my answer helps you.

What Are The Four Steps Of The Binary Search Algorithm

Related Questions

Under what scenarios can we clear the NVRAM by moving the PSWD jumper to the RTCRST
pins?

Answers

One can clear the NVRAM by moving the PSWD jumper to the RTCRST pins in the following scenarios:

When the computer system is on for 10 secondsWhen the jumper is set to the closed position

What is a jumper ?

A jumper (usually found on early days computers) is used when the computer needs to close an electrical circuit

The NVRAM which means a non-volatile random-access memory can be reset or clear when the computer system is on for 10 seconds and when the jumper is set to the closed position

Read more about computer at:

https://brainly.com/question/24032221

Can someone give me answers for 1-4

Answers

Answer:

you want me help u with this one?

2. The different amount of shades of color

3. The artist had given every marvel or DC or villian the color that fit them and the texture is also very nice in the picture.

4. The artist maybe could make the pic a little bit more high quality cause in the image is sort of blurry and you cant really see the further people that well.

Which of the following is a characteristic of TIFFs?

universal standard for image file formats

cross-platform

the one version of TIFF that exists

only available as a vector graphic
please help

Answers

Answer:

What are the characteristics of a TIFF file?

A TIFF file supports grayscale as well as RBG,CMYK, and LAB color space. The format allows a color depth of up to 16 bits per color channel and is therefore ideal for data exchange during a RAW conversion. The abbreviation TIFF, or more rarely TIF, stands for “Tagged Image File Format”.

Answer:

universal standard for image file formats

Identify three (3) general-purpose computing devices and write a short (no more than one page) essay explaining in detail the computing process.

Answers

The three general-purpose computing devices are desktops, notebooks, smartphones. The computing process of these devices are further explained below.

What are general-purpose computers?

A general-purpose computer is a type of computer that has the ability to carry out many different tasks. The following tasks can be performed by the general purpose computing devices:

installation of softwares,

processing of data, and

storage of processed data.

The computing process of all the general-purpose computer are the same.

It involves preparation and inputting of data into the computer using the input devices.

The data is sent to the processing unit called the central processing unit (CPU) which has the electronic circuitry that manipulates input data into the information people want.

The information is then displayed in an output device example the monitor, for the user to view.

Therefore, the three general-purpose computing devices are desktops, notebooks, smartphones.

Learn more about computing process here:

https://brainly.com/question/26409104

// This pseudocode segment is intended to compute and display
// the average grade of three tests for any number of students.
// The program executes until the user enters a negative value
// for the first test score.
start
Declarations
num test1
num test2
num test3
num average
housekeeping()
while test1 >= 0
mainLoop()
endwhile
endOfJob()
stop

housekeeping()
output "Enter score for test 1 or a negative number to quit"
return

mainLoop()
output "Enter score for test 2"
input test2
average = (test1 + test2 + test3) / 3
output "Average is ", average
output "Enter score for test 1 or a negative number to quit"
input tesst1
return

endOfJob()
output "End of program"
return

Answers

The pseudocode to calculate the average of the test scores until the user enters a negative input serves as a prototype of the actual program

The errors in the pseudocode

The errors in the pseudocode include:

Inclusion of unusable segmentsIncorrect variablesIncorrect loops

The correct pseudocode

The correct pseudocode where all errors are corrected and the unusable segments are removed is as follows:

start

Declarations

     num test1

     num test2

     num test3

     num average

output "Enter score for test 1 or a negative number to quit"

input test1

while test1 >= 0

     output "Enter score for test 2"

     input test2

     output "Enter score for test 3"

     input test3

     average = (test1 + test2 + test3) / 3

     output "Average is ", average

     output "Enter score for test 1 or a negative number to quit"

     input test1

endwhile

output "End of program"

stop

Read more about pseudocodes at:

https://brainly.com/question/11623795

PLS HELP In VPython, finish the code to draw a horizontal axis.

origin = vector (0, 0, 0)
axis = cylinder(pos=origin, axis=vector(________)

options are (50, 0, 0), (0, 50, 0) and (0, 0, 50)
its NOT (0, 50, 0)

Answers

Use the knowledge in computational language in python to write a code that draw a horizontal axis with vectors.

How to define vectors in Python?

In Python it is possible to define a vector with characters, forming a word, that is, a string of characters, which is abbreviated as "string". To do this, you can assign it as a constant or read the data as a word.

So in an easier way we have that the code is:

mybox = box(pos=vector(x0,y0,z0),

           axis=vector(a,b,c)

length=L,

height=H,

width=W,

up=vector(q,r,s))

See more about python at brainly.com/question/18502436

Sorry for being late, but the answer is...

50, 0, 0

PROOF:

can anyone tell me about Microsoft some important features for partical

Answers

This is the answer from my opinion.

A desktop is one kind of computer. Name two other kinds?​

Answers

Answer:

Notebook, supercomputer.

Explanation:

Notebooks are laptops, usually low performance.

Supercomputers are the best performing computers in the world.

Answer:

super computers and mainframe computers

Explanation:

these computers were used way before desktop computers

"You have created a Word document named apple.docx using Microsoft Word. What type of a file is apple.docx ? Select all that apply"

Answers

The type of a file that is in  apple.docx is Executable program file.

What is an executable file?

An executable file (EXE file) is known to be a type of computer file that has a encoded sequence of codes or instructions that the system often work on  when the user is said to clicks the file icon.

Note that Executable files are known to have an EXE file extension, and there are a lot of other executable file formats. The type of a file that is in  apple.docx is Executable program file.

Learn more about Word document from

https://brainly.com/question/25567167

what impact of information communication technology have on the environment about electronic waste, use of electricity?​

Answers

Answer:

When e-waste is exposed to the heat, toxic chemicals are released into the air damaging the atmosphere.

Explanation:

• Do you think documentaries are best delivered in media such as films or documentary?
• Do you think only thru survey can sustain authenticity of the information need within a study?​

Answers

Answer:

I think documentaries are the best delivered in media format because it adds intrigue and lowers boredom.

I think surveys are nice for studies, but not good enough because people can click answers that they know to be false, at least, for them.

Ensure that the Facilities worksheet is active. Enter a reference to the beginning loan balance in cell B12 and enter a reference to the payment amount in cell C12.

Answers

A reference value to the beginning loan balance in cell B12 is E6 ($325,000.00) while a reference to the payment amount in cell C12 is $B$6.

What is a spreadsheet?

A spreadsheet refers to a document which comprises cells that are arranged in a tabulated format with rows and columns. Also, a spreadsheet is typically used in various fiedls for calculating, sorting, formatting, arranging, analyzing, and storing data on computer systems.

In this scenario, a reference value to the beginning loan balance in cell B12 would be E6 with a value of $325,000.00 while a reference value to the payment amount in cell C12 would be $B$6.

In conclusion, cell B12 will always show the beginning loan balance and cell C12 will always show a static payment amount for all the other cells in this spreadsheet.

Read more on spreadsheets here: https://brainly.com/question/4965119

Most graphics software programs give you the choice to work in either RGB or CMYK. What are these specifications called?
A.
digital codes
B.
color spaces
C.
computer graphics
D.
artwork

Answers

A - digital codes

Hope I’m right

Answer:B

Explanation:

In programming 2+6 is an example of what math

Answers

Answer:

[tex]beinggreat78~here~to~help.[/tex]

2 + 6 in programming is an example of math. It is the same as in the real world. Plus signs in coding are also a form of string concatenaction, the term used for combining two strings into one, or a variable into a string.

Which method adds 10 to the right end of the array?
myArray.
insert
(10)

Answers

JavaScript has a set of mutator functions that allow you to modify the contents of an array without referencing the individual elements.To add to to myArray we us the push() method

Adding Elements to an Array

To add to to myArray we us the push() method

(10)

myArray.push(10)

There are two mutator functions for adding elements to an array: push() and unshift(). The push() function adds an element to the end of an array:

var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums.push(6);

print(nums); // 1,2,3,4,5,6

var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums[nums.length] = 6; print(nums); // 1,2,3,4,5,6

Learn more about arrays here:

https://brainly.com/question/24275089

It would be Array.append(10), so append is the answer.

Which programming term describes the value that is passed to a method when called
so that the method knows what to do?
A parameter
An argument
A function
A variable

Answers

The programming term that describes the value that is passed to a method when called so that the method knows what to do is an Argument

What is an  Argument?

An argument in Programming are variables used to specify a value when you want to call a fuhnction which provides the programs utilizing more informathion.

A bettrer understanding is as follows:

create a function, pass in data in the form of an argumentProgram utilizes more information from the value of the argument.

For example

Say you want to create a function that describes how much money you're having; We can use artgument to descriptive as possible.

Before now, the function may have looked like:

string howMuchmoney() {

    return "so much money";

Modifying  the function prototype and implementation to take a string argument, it becomes

string howMuchmoney(string amount);

Change your return statement to:

return amount + "money";

Add a string to the parentheses where you call the function:

howMuchmoney("tons of")

Learn more in using Argument here:https://brainly.com/question/6067168

QUESTION
1.1 List 10 TEN advantages of word processing.

Answers

Quality : It produces error free documents. The spell and grammar check in word processing makes the document to be neat and error-free. We can get multiple copies of excellent formatted nature in word Processing.

! Storage of Text : We can take any number of copies with word processor. Not only that, if we need the same document with some slight changes, we need not type the same letter again. Just by making some slight changes, we can obtain a modified copy easily.Time Saving : We can get any number of copies of document in future without retyping. We can get the copy of document on any printer.

! Security : We can protect the documents in word processing by giving passwords. So there is a less chance of viewing the documents by unauthorized persons.

! Dynamic Exchange of Data : We can have dynamic exchange of objects and pictures from other documents into word processing documents. The documents can be linked to each other. 

Improving Efficiency and Accuracy. Besides simply saving time, word processing offers ways to improve workers' efficiency and accuracy. Word processors contain software to automatically correct common errors and identify misspellings, improving overall speed and reducing

these may be some of them

Type the correct answer in the box. Spell the word correctly.

Which firewall monitors traffic from the DMZ to the LAN?

When a DMZ is set up using dual firewalls, the___

-end firewall monitors traffic moving from the DMZ toward the LAN while the ___

firewall monitors the traffic from the Internet toward the DMZ.

Answers

The firewall that monitors traffic from the DMZ to the LAN is the second, or internal (dual-firewall)

Which firewall manages traffic from the DMZ to the LAN?

In this kind of traffic, the second, or internal, firewall is known to be the one that gives room for traffic to move from the DMZ to the internal network.

Note that the dual-firewall approach is seen as a very secure way due to the fact that  two devices have to be compromised before any kind of attacker can be able to gain access into the internal LAN.

When a DMZ is set up using dual firewalls, the web server is placed inside the DMZ and the private network is often placed behind the DMZ.

Learn more about firewall from

https://brainly.com/question/13693641

A victimless crime is committed when
|. Select 3 options.
someone downloads a pirated song or video
a copyrighted image is used without permission
a stranger accesses your internet banking
a person downloads and uses pirated software
a hacker sells a company's financial statements

Answers

Someone downloads a pirated song or video a copyrighted image is used without permission and a person downloads and uses pirated software.

A victimless crime is committed when a copyrighted image is used without permission 2. a stranger accesses your internet banking 3. a hacker sells a company’s financial statements.

Victimless crimes are illegal acts that break the laws, but there is no single victim of the crime. They are against social values and laws. A copyrighted image is used without permission

Examples are gambling, traffic violations, etc. Thus, Victimless crimes differ from other types of crime because it does not have an identifiable victim. This crime is against laws and social values and beliefs.

To know more about victimless crimes, visit:

brainly.com/question/17251009

#SPJ6

A team member who does not feel comfortable disagreeing with someones opinion in front of the team would most likely come from a

Answers

Answer:

discussions and decisions made about public policy

Explanation:

If you determine that the hard drive is experiencing excessive use but the Windows Experience Index reports that memory is the system bottleneck, which component do you upgrade first: memory or the hard drive? Why?

Answers

The reason why is it is good to use an Upgrade memory is because low amounts of memory can lead to much use of the hard drive and based n the fact that it is not costly to upgrade memory than to upgrade the hard drive.

What is upgrading memory?

This is known to b an act done so as to improve the performance of a computer.

It is often known as a RAM or system memory upgrade. An upgrade implies that one is adding memory modules along with the ones that were there or replacing the old ones. It is less costly when compared to hard drive upgrade.

Learn more about Upgrade memory  from

https://brainly.com/question/13196228

8. Show that x = xy + xy'
a) Using truth tables
b) Using Boolean identities

Answers

Answer:

B

Explanation:

Cause Show that x =Xy plus xy' is common = is Using Boolean Identify? tY me

It is possible to publish a presentation online. True False

Answers

Answer:

It should be true

Explanation:

I don't see why it wouldn't

Develop a program to sort a file consisting of bonks details in the alphabetical order of author names. The details of books include book id, author_name, price. no of pages, publisher, year of publishing
Please provide C++ program for above question.​

Answers

Use the knowledge in computational language in C++ to write the a code with alphabetical order of author name.

How to define an array in C++?

An Array is a set of values ​​arranged in lists and accessible through a positive numeric index. So, we have that each position of our Array is a variable of the type of our Array, so we have to have a way to initialize this set of variables.

#include <iostream>

#include <iomanip>

#include <fstream>

#include <string>

using namespace std;

struct Book {

   string title;

   string author;

};

const int ARRAY_SIZE = 1000;

Book books [ARRAY_SIZE];

string pathname;

ifstream library;

int LoadData();

void ShowAll(int count);

void ShowBooksByAuthor(int count, string name);

void ShowBooksByTitle(int count, string title);

void sortByTitle(int count, string title);

void sortByAuthor(int count, string author);

int main()

{  

   int count = 0;

   char selector = 'q', yesNoAnswer = 'n';

   string name;

   string title;

     cout << "Welcome to Forrest's Library Database." << endl;

   cout << "Please enter the name of the backup file: ";

   getline(cin, pathname);

   LoadData();

   count = LoadData();

   cout  << count << " records loaded successfully." << endl;

   do

   {

       cout << endl << "\t(S)how All, Search (A)uthor, Search (T)itle, (Q)uit: ";

       cin >> selector;

       selector = toupper(selector);

       switch(selector)

       {

           case 'S':

               sortByTitle(count, title);

               if (count <= 0)

                   cout << "No counts found!\n";

               else

                   ShowAll(count);

               break;

           case 'A':

               sortByAuthor(count, name);

               cout << "bookAuthor: ";

               cin.ignore();

               getline(cin, name);

               if (count <= 0)

                   cout << "No records found!\n";

               else

                   ShowBooksByAuthor(count, name);

               break;

           case 'T':

               sortByTitle(count, title);

               cout << "bookTitle: ";

               cin.ignore();

               getline(cin, title);

               if (count <= 0)

                   cout << "No records found!\n";

               else

                   ShowBooksByTitle(count, title);      

               break;

       }

   }

   while (selector != 'q' && selector != 'Q');

   return 0;

}

int LoadData()

{

   int count = 0;

   int i = 0;

   library.open(pathname);

   ifstream library(pathname);

   if (!library)

   {

       cout << "Cannot open backup file" << endl;

       return 0;

   }

   while (!library.eof())

   {

       getline(library, books[count].title);

       getline(library, books[count].author);

       count++;

   }

   return count;

}

void ShowAll(int count)

{

   for (int i = 0; i < count; i++)

   {

      cout << books[i].title << " " << "(" << books[i].author << ")" << endl;

   }

}

void ShowBooksByAuthor(int count, string name)

{

   int j = 0;

   for (int i = 0; i < count; i++)

   {

       if(books[i].author.find(name) < 100)

       {

           cout << books[i].title << " " << "(" << books[i].author << ")" << endl;

           j++;

       }

   }

   cout << j << " records found";}

void ShowBooksByTitle(int count, string title)

{

   int j = 0;

   for (int i = 0; i < count; i++)

   {

       if(books[i].title.find(title) < 100)

       {

           cout << books[i].title << " " << "(" << books[i].author << ")" << endl;

           j++;

       }

   }

   cout << j << " records found";

}

void sortByTitle(int count, string title) {

   string temp;

   for (int i = 0; i < count; i++) {

       for(int j = 0; j < count - i; j++) {

           if (books[j].title > books[j + 1].title) {

               temp = books[j].title;

               books[j].title = books[j + 1].title;

               books[j + 1].title = temp;

           }

       }

   }

}

void sortByAuthor(int count, string name) {

   string temp;

   for (int i = 0; i < count; i++) {

       for(int j = 0; j < count - i; j++) {

           if (books[j].author > books[j + 1].author) {

               temp = books[j].author;

               books[j].author = books[j + 1].author;

               books[j + 1].author = temp;

           }

       }

   }

}

See more about C++ at brainly.com/question/19705654

Which of the following are logical functions? Select all the options that apply.

Answers

Answer:

functions (reference)

Function Description

IFS function Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition.

NOT function Reverses the logic of its argument

OR function Returns TRUE if any argument is TRUE

Define a function FindLargestNum() with no parameters that reads integers from input until a negative integer is read. The function returns the largest of the integers read

Answers

The FindLargestNum program is an illustration of function; where its execution is done when its name is called or evoked

The function FindLargestNum

The FindLargestNum function written in Python, where comments are used to explain each action is as follows:

#Thie defines the FindLargestNum function

def FindLargestNum():

   #This gets the first input

   num = int(input())

   #This initializes the minimum value

   maxm = num

   #The following is repeated until the user enters a negative input

   while num >= 0:

       #This determines the largest input

       if num > maxm:

           maxm = num

       #This gets the another input

       num = int(input())

   #This prints the largest input

   print(maxm)

Read more about functions at:

https://brainly.com/question/24941798

In the 1760s and early 1770s, the British government wanted to raise money by taxing the residents of its colonies in North America. They taxed goods such as sugar and tea and even placed a tax on the printing of documents. These actions angered the colonists, who thought that taxation was unfair since they had no representation in the British government. For this reason, a group of colonists dumped hundreds of chests of tea from Britain into Boston Harbor in 1773, in what became known as the Boston Tea Party. As a result, England passed a series of harsh new laws to punish the colonists, further angering them. The Continental Congress met to voice the colonists' grievances, and eventually, on July 4, 1776, the colonists declared their independence from Britain.

Answers

Answer:

Taxes and other laws imposed on the colonies led the colonists to declare independence from England.

Explanation:

During the British government, laws taxes, and other laws increased in the colonies which led the colonists to declare independence from England.

How colonists declared their independence from Britain?

As a result, the British were forced to deploy a large army in North America on March 22, 1765, the British parliament passed the Stamp Act.

Which aimed to raise money by levying a tax on all legal and official papers and publications that were being distributed across the colonies. The Stamp Act angered the American colonists, which moved fast to oppose it.

A direct appeal to Parliament was virtually difficult due to the colony's extreme distance from London, the heart of British politics.

Therefore to raise money and increase taxes and laws colonists declared their independence on 4 July 1776 from Britain.

Learn more about the British government, here:

https://brainly.com/question/2848503

#SPJ5

A set of activities that performs across the organization creating as output of values to the customer
a.
Business process
b.
Customer process
c.
Quality process
d.
Software process
e.
Integrated process

Answers

the correct answer is A : Business Process

An onsite technician at a customer site installed a PERC 10 card in an R630 server. The first time the server booted, the customer was unable to see the drives. The customer restarted the server a second time. This time, the server is not booting at all. An issue with the installation of an unsupported PERC card is suspected. What is the next best step to take?

Answers

The next best step to take in the situation above is to remove the failed card from the system and one can use a replacement card to see if the same issue will arise.

What is an IL PERC card?

PERC is a term that connote  Permanent Employee Registration Card. If a person holds this card, it is a card that shows that one have undergone some specific state and federal background checks and fingerprinting to function as a security guard in Illinois.

The Potential employers of security guards is one that needs applicants to have a PERC card and when the card fails, it may be due to the machine or faulty card or corrupt card.

Learn more about installation  from

https://brainly.com/question/17506968

1. What is TRUNC for Delphi
programming language?
Please explain in at least 200
words.

Answers

The Trunc function cut off a floating-point value by removing the fractional part. The Trunc  function often brings back an integer result as it is not a real function.

What is the Trunc function in Delphi?

When you look at the Delphi code, the Trunc function is known to be a fuction that reduces or cut off a real-type value and make it into an integer-type value.

Note that X is a real-type expression and so the Trunc is said to often brings back an Int64 value that is meaning the value of X approximated to zero and when the cut of value of X is not found in  the Int64 range, an EInvalidOp exception is brought up.

Learn more about programming language from

https://brainly.com/question/8151764

Other Questions
The consumer surplus will _____ by _____ when the United States engages in international trade and the international price for MP3 players settles at $50. WILL CHOOSE BRAINLIEST! Find the measure of BCX when a resident is using a bedpan you should You are shooting a rifle or handgun. what is the best way to pull the trigger for an accurate shot?. A rectangle has a length of 15 cm and a width of 11 cm. What is its perimeter?165 cm52 cm26 cm54 cm somehow it wont let me choose math sorry.... pls answer its important Trish is sorting bolts for her home repair business. She has an 8-pound bag of bolts. If each kitchen her team repairs requires 1/5 pound of bolts, how many kitchen can she repair? Joshua solves the problem by finding 8 1/5 = 40. Melanie solves the problem by finding 8 5 = 40. Use the drop-down menus to explain why Joshua and Melanie are both correct.Choose... a whole number by a unit fraction is the same as multiplying a whole number by the Choose... of the unit fraction. CHOOSE THING STUFF1st choose: MULTIPLYING or DIVIDING2nd choose: NUMBERATOR or DEMOMINATOR A suit is on sale for $414 , which is 28% less than the regular price.What is the regular price? I told you I would let you know,so here it is goodbye At the local level of government citizens have what power What happens if you still have abalance on your credit card AFTER thecompany starts charging you interest?A. The bank will extend the 0% APR so you don't payinterest.B. The bank will offer you a 0% so they make no moneyoff you.C. The bank will make your interest payments for you.D. The bank will make money from the interest fees youpay. Super easy 7th grade math worth a lot of points Why was Castro a strong opponent of the United States and its policies during the Cold War?HURRY HELP PLEASEEEE What is the best estimate of the area of the figure on the grid if each square has a side length of 1 inch?12 square inchesO 20 square inches25 square inchesO 33 square inches Which of the following numbers is a composite number? A. 11 B. 17 C. 23 D. 27 in what ways did the german invasion of russia alter the course of the war Which generalization about democracy is most valid?1.Democratic political systems require a highly industrialized society.2.Democratic governments first evolved in North America.3.Democratic governments prevent their citizens from traveling abroad.44.Democratic governments protect basic civil liberties.Submit Answer if 2x2 is 4 then why is 2+2 5???? Should governments use propaganda to influence citizens? Write as an summary 5 sentences What is the first element with an atomic mass greater