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]
3 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]3 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 best way to insert an existing Excel chart into a document is to
nlexa [21]

B. Click the Insert tab and choose chart.

7 0
4 years ago
Read 2 more answers
In a pinhole camera, the image seen in the camera will be inverted<br><br> true<br> false
Sati [7]
Hey there,

Based on my research, I believe that your correct answer may be "True".<span>the image seen in the camera will be inverted because it is a pinhole camera.

~Jurgen</span>
6 0
3 years ago
Read 2 more answers
C source files natively compiled on a Linux system using an ARM processor produce an executable file only runnable on ARM machin
Bumek [7]

Answer:

b. False.

Explanation:

Linux system is an operating system just like windows. Android is powered by Linux which is one of the most popular operating systems in Smart phones. Linux operating system was released in 1991, but it gained significance in 20th century. ARM processor can produce executable file on ARM machine with Linux system using x86 chipset.

3 0
3 years ago
Does someone know what type of usb is that one called?
Doss [256]
It is USB 2.0 mini b 5 pin

3 0
3 years ago
Read 2 more answers
Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the fo
zavuch27 [327]

Answer:

D) extents

Explanation:

Disks fragmentations in computer science refers to the cases of a file system laying out its contents  in a non-continuous manner thus preventing an in-place alteration of the contents (that is the contents of the file are scattered in fragments across different location on the disk). Disk fragmentation is mostly associated with aging. To mitigate against this, modern implementation of file systems try to preallocate longer chunks of disk space, this is called extents, in this way fragmentation is avoided since a contiguous size of disk space is preallocated to the files and its contents stay together.

4 0
3 years ago
Other questions:
  • Hard drive storage is considered to be solid state. true or false
    8·1 answer
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • What runs horizontally and is identified with numbers?
    12·2 answers
  • A computer can sort x objects in t seconds, as modeled by the function below:
    5·1 answer
  • _________ mode is similar to Cipher Feedback, except that the input to the encryption algorithm is the preceding DES output. A.
    11·1 answer
  • Write an application for Cody’s Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery
    14·1 answer
  • Https://intro.edhesive.com/courses/17288/assignments/2313298?module_item_id=4864185
    9·1 answer
  • Discuss the importance of top management commitment and the development of standards for successful project management. Provide
    10·1 answer
  • Write a C++ program that would take 10 integers and outputs mean, median, and range. Create at least three functions: one for so
    7·1 answer
  • Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!