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
allsm [11]
2 years ago
7

Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer.

Computers and Technology
1 answer:
DochEvi [55]2 years ago
4 0

We have that the appropriate statement will be

  • An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list. Which of the algorithms run in reasonable time

III only.

Option B

From the question we are told

Consider the following <u>algorithms</u>. Each <u>algorithm</u> operates on a list containing n <em>elements</em>, where n is a very large <u>integer</u>.

I. An algorithm that accesses each <u>element</u> in the list twice.

II. An <em>algorithm </em>that accesses each <u>element </u>in the list n times.

III. An <u>algorithm</u> that accesses only the first 10 elements in the list, regardless of the size of the list. Which of the <em>algorithms </em>run in <em>reasonable </em>time?

<h3>Algorithm  </h3>

Generally In order to get <em>admission </em>to every thing in the list twice, the algorithm has to traverse the listing twice,

which leads to 2*n entry to operations.

And if the every factor is accessed n times, the listing will be traversed n time, which leads to n^2 get right of entry to operations.

If n is a very giant <em>integer</em>, each 2*n and n^2 are plenty larger.

So, there will be <em>solely </em>ten entry to operations and this algorithm will have a sensible jogging time.

Therefore

An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list. Which of the algorithms run in reasonable time

III only.

Option B

For more information on  algorithm  visit

brainly.com/question/950632

You might be interested in
Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function
MA_775_DIABLO [31]

Answer:

if ((b*b - 4*a*c)<0)

    cout << "no real solutions";

return;

Explanation:

To check if "b squared" – 4ac is negative, we use the expression  if ((b*b - 4*a*c)<0). This expression evaluates the 'bsquared' and substracts '4ac' from it. It then compares the resulting value with zero. if it is less than zero it means it is a negative number, so it executes the statement following cout << "no real solutions"; and returns

8 0
4 years ago
Variables used for input are associated with what controls on a form ?​
zalisa [80]

Answer:

The answer to this question is given below in the explanation section

Explanation:

There are different forms control. for example HTML form controls are:

  • Text Input Controls.
  • Checkboxes Controls.
  • Radio Box Controls.
  • Select Box Controls.
  • File Select boxes.
  • Hidden Controls.
  • Clickable Buttons.
  • Submit and Reset Button.

to take input from the user and store it into the variable, mostly text input form control is used.

however, you can also use text input, checkbox, radio button as a control to take input from the user and store the input value in some variables.

5 0
3 years ago
When we insert a new node into a red-black tree, we set the color of the newly inserted node n to red. observe that if we had ch
Vika [28.1K]
Cause u didnt want to
4 0
4 years ago
The size and mass of Mars is similar to the Earth.<br><br> True<br> False
Ahat [919]
True, the size and mass of Mars is close to the size and mass of Earth.
4 0
4 years ago
Read 2 more answers
What is the newest code language?​
pickupchik [31]

Answer:

<u>Python 3</u>

Explanation:

The language's latest iteration, Python 3.9, was released on October 5, 2020. It includes even more new features such as relaxed grammar restrictions, flexible function and variable annotations, and new string methods to remove prefixes and suffixes.

5 0
3 years ago
Read 2 more answers
Other questions:
  • HURRY
    5·1 answer
  • Determine if the following identifiers are valid. If they are invalid, state the reason. For example, the identifier min value i
    9·1 answer
  • IN YOUR OWN WORDS, create a new thread and compare and contrast paraphrasing, summarizing, and quoting and how to do each succes
    14·1 answer
  • When and how should internet service providers be allowed to treat some kinds of internet traffic different from others?
    7·1 answer
  • When saving a PowerPoint presentation as a show which object will not be saved with the presentation
    13·2 answers
  • Which of the following best describes the difference between software and hardware?
    9·2 answers
  • The __________ on a mouse is used to select or place the cursor where you want on the page
    13·1 answer
  • What is one example of an emerging class of software
    12·1 answer
  • When a program uses a ____, it reads all the records in the file from beginning to end, processing them one at a time. Group of
    5·1 answer
  • What is density?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!