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
The internet maybe best compared to what
attashe74 [19]
The internet can be compared to many stuff, such as a world wide web, or a huge box with stuff and you put in what you want and it comes out! 
6 0
2 years ago
Which library research databases include information about articles published in magazines, journals, and newspapers? question 1
Alecsey [184]

Answer:

periodical databases

Explanation:

Among the various databases you can now access in a library, the periodical databases contains the text and other information about articles published in magazines, journal and newspapers.

This database allows you for example to easily search for all articles written about a specific event or person, and it will return you the list of articles you can then read from a single spot, no matter where or when the article was written.

8 0
3 years ago
What kind of physical device is an evil twin access point? What does the evil twin do after initial association when the victim
Rufina [12.5K]

Answer:

A PC such as a notebook computer.The evil twin gets the encrypted frame from the affected host,A VPN  encrypts a  frame with its own VPN key.

Explanation:

The evil twin after initial association when the victim client will establish a secure wireless connection with the victim client. The connection uses a key client-EF for encryption such that when the host transmits an encrypted frame it is transmitted to the evil twin. A VPN is an encrypted virtual private network used to access networks that are not trusted. The client encrypts a frame with a VPN key (Key Client-Server) which it shares with the server. The frame is further encrypted by the key it shares with the evil twin (Victim Client-ET) The evil twin will then receive a double encrypted frame. However, it will only be able to decrypt the Victim Client-ET key but not the VPN key hence it will not be able to read the message sent through the frame.

7 0
3 years ago
Good participation in music is strictly limited to those who perform well. true or false
sdas [7]
The answer would be false because you don't have to be good at it to participate and try your hardest
8 0
3 years ago
Read 2 more answers
The function known as "Comments" can be displayed during a presentation<br>O True<br>False​
Sonja [21]

Answer:

false

Explanation:

Select the comment icon. on the slide. The Comments pane will open and you can see comments for that slide.

Select Reply to respond to a comment.

Select the Next or Back buttons to go between comments and slides.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Peter wants to submit his admission form online. What type of input element will allow him to enter his last name on the web pag
    6·1 answer
  • Cuales Son las características de la máquina analítica de Carlos Babbage ?
    11·1 answer
  • How much a 1 Gigabyte in Bytes:<br> 1. 1e+9<br> 2. 1e+6<br> 3. 1000
    8·2 answers
  • __________ is a collection of formatting options—such as a frame, a rounded shape, and a shadow—that changes a picture’s overall
    5·1 answer
  • What is also known as a visual aid in presentation
    15·1 answer
  • Check examples of a good work ethic. *
    6·1 answer
  • I need urgent help. which of these network has minimum data loss. a. LAN b. MAN c. WAN ​
    11·1 answer
  • Select the correct answer from each drop-down menu. Look at Marta's email signature and fill in the missing elements. Marta D'Ab
    14·2 answers
  • The operating system provides a ____, which is the means with which you interact with the computer
    5·1 answer
  • Write a function definition for a function which takes one parameter and returns twice that parameter
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!