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

Recall the binary search algorithm.1. Using the algorithm/algorithmic environment, give pseudocode using a for loop.AnswerMy alg

orithm for binary search using a for loop is given in Algorithm 1.Algorithm 1BinarySearchFor(A)[[XXX TODO:pseudocode here]]2. Using the algorithm/algorithmic environment, give pseudocode using a while loop.Answer[[XXX TODO:your answer here]]3. Using the algorithm/algorithmic environment, give pseudocode using recursion.Answer[[XXX TODO:your answer here]]4. What is the loop invariant of your second algorithm
Computers and Technology
1 answer:
faust18 [17]2 years ago
5 0

Answer:

Following are the Pseudo Code to the given question:

Explanation:

Following are the pseudo-code by using the For loop:

Defines the A function (node, element)

The node is larger than 0.

if another value of the node equals its element

Loop Break

That element if node. value becomes lower than that

Node is node equivalent.

right

Using other nodes is node equivalent.

 left

Node Return

If the node is vacant

print the Tree is empty

Following are the pseudo-code by using the while loop:

Defines the function A(node,element)

While this node is not zero.

if the value of the node equals the element

Loop Break

The element if node. value is lower than

Node is node equivalent.

right

Using other nodes is equivalent to an a.left node

Node Return

If the node is vacant

print Tree is empty

following are the Pseudo-code for recursion:

Set the function A (node, key)

If no root is the same as the root or no root.

return the root.

If the root value is lower than that of the quest for key return (root. right, key)

Return your lookup (root.left,key)

 

You might be interested in
If your computer is frozen what is something you would do to troubleshoot the problem ​
SpyIntel [72]

Answer:

Ctrl+Alt+Del

Explanation:

It will take you to the task manager and you can highlight the program that is frozen, right click on it and select end task. Or hard reboot as a last resort.

4 0
2 years ago
Which of the following is a message sent from one person to another using the Internet?
Alexxx [7]
Where is the message lol ?
8 0
2 years ago
Read 2 more answers
What is htc one mseven​
Tamiku [17]

"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

8 0
2 years ago
For those that play pc games how do you go outside in The Sims 2?
yanalaym [24]

Answer:

My sister plays a lot of the sims 4 but I do recall she also played the Sims 2 so when she would go outside she would command them to do that.

Explanation:

If this does not work I would suggest you get a video that can explain it better than I possibly would? Considering the Sims 2 was made a while back you would maybe want somebody with a little more experience.

5 0
3 years ago
Read 2 more answers
persisting clumps of clippings can cause the turf below to yellow and possibly die. this phonomenon is called _________________
SOVA2 [1]

The turf below may turn yellow and even die as a result of persistent clumps of clippings. The silo effect is the name given to this phenomenon.

<h3>What is the business silo effect?</h3>

The term "silo effect," which is used frequently in the business and organizational communities to describe a lack of communication and shared objectives between departments in an organization, is used to describe this situation. Employee groups that typically operate independently within an organization are referred to as silos.

<h3>Silo mentality definition?</h3>

A silo mentality occurs when different teams or team members within the same organization purposefully withhold important information from other employees. This silo mentality undermines a company's unified vision and prevents long-term objectives from being reached.

To know more about clumps of clippings visit:-

brainly.com/question/29454362

#SPJ4

5 0
1 year ago
Other questions:
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • ​printers, monitors,​ tablets, cpus, and laptops are examples of​ ____________.
    14·1 answer
  • All of the following are methods of communication
    8·2 answers
  • Write a program that asks the user to enter two dates (in YYYY-MM-DD format), and then prints which date is earlier. Your progra
    15·1 answer
  • Which of the following best describes the 7x7 PowerPoint rule
    8·1 answer
  • Difference between volatile and non volatile memory
    14·2 answers
  • Which network media uses different regions of the electromagnetic spectrum to transmit signals through air?
    13·1 answer
  • Which statement assigns the value 140 to the variable streetNumber in Python?
    13·1 answer
  • An analogue sensor has a bandwidth which extends from very low frequencies up to a maximum of 14.5 kHz. Using the Sampling Theor
    9·2 answers
  • Anyone know what the very first question that was sent on brainly is?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!