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
GenaCL600 [577]
3 years ago
9

. Consider the problem of finding the largest element in a list of n elements. What will be the basic operation of an algorithm

to solve this problem?
assignment

addition

looping

comparesn
Computers and Technology
1 answer:
natali 33 [55]3 years ago
4 0

Answer:

Comparison.

Explanation:

When we have to find a largest in a list of n elements.First we have to iterate over the list so we can access all the elements of the list in one go.Then to find the largest element in the list we have to initialize a variable outside the loop with the minimum value possible and in the loop compare each element with this value,if the element is greater than the variable assign the element to the variable.Then the loop will find the largest element and it will be the variable.

You might be interested in
What does the word strained mean as it is used in paragraph 16 the story is from where the red fern grows but this are the answe
Luba_88 [7]

Answer:

i just  need points sryYY

Explanation

7 0
3 years ago
Which port security violation mode does not generate messages or increment the violations counter?
Zanzabum

The number of violations is increased. When a secure port is in the error-disabled condition, the shutdown and restrict command can be used to restore it.

<h3>What is  offence?</h3>

A deviation from a code of conduct or law is referred to as a violation. When driving a car, going over the posted speed limit is a regular legal violation. Invading someone else's privacy could include reading their journal. failure to uphold a duty or right; breaching the law.

The two types of violations are states and acts. A transgression is a violation of the rules that is less serious than a foul and frequently involves technicalities of the game. A disrespectful or vulgar act: profanation.

Hence, The number of violations is increased. When a secure port is in the error-disabled condition, the shutdown and restrict command can be used to restore it.

To learn more about violation, refer to:

brainly.com/question/1274113

#SPJ4

4 0
2 years ago
When looking at a program board at the end of program increment (PI) planning, what does it mean when a feature is placed in a t
IRISSAK [1]

Answer:

It simply means that other teams can independently complete the feature.

Explanation:

PI or program increment is a planning interval during which an agile release train (ART) plans and produces working and tested software and systems. It takes a duration of 8 to 12 weeks

Agile teams can access and independently complete various ARTs found in their swim lanes with no strings.

3 0
3 years ago
We have said that the average number of comparisons need to find a target value in an n-element list using sequential search is
bija089 [108]

Answer:

Part a: If the list contains n elements (where n is odd) the middle term is at index (n-1)/2 and the number of comparisons are (n+1)/2.

Part b: If the list contains n elements (where n is even) the middle terms are  at index (n-2)/2 & n/2 and the number of comparisons are (n+2)/2.

Part c: The average number of comparisons for a list bearing n elements is 2n+3/4 comparisons.

Explanation:

Suppose the list is such that the starting index is 0.

Part a

If list has 15 elements, the middle item would be given at 7th index i.e.

there are 7 indices(0,1,2,3,4,5,6) below it and 7 indices(8,9,10,11,12,13,14) above it. It will have to run 8 comparisons  to find the middle term.

If list has 17 elements, the middle item would be given at 8th index i.e.

there are 8 indices(0,1,2,3,4,5,6,7) below it and 8 indices(9,10,11,12,13,14,15,16) above it.It will have to run 9 comparisons  to find the middle term.

If list has 21 elements, the middle item would be given at 10th index i.e.

there are 10 indices (0,1,2,3,4,5,6,7,8,9) below it and 10 indices (11,12,13,14,15,16,17,18,19,20) above it.It will have to run 11 comparisons  to find the middle term.

Now this indicates that if the list contains n elements (where n is odd) the middle term is at index (n-1)/2 and the number of comparisons are (n+1)/2.

Part b

If list has 16 elements, there are two middle terms as  one at would be at 7th index and the one at 8th index .There are 7 indices(0,1,2,3,4,5,6) below it and 7 indices(9,10,11,12,13,14,15) above it. It will have to run 9 comparisons  to find the middle terms.

If list has 18 elements, there are two middle terms as  one at would be at 8th index and the one at 9th index .There are 8 indices(0,1,2,3,4,5,6,7) below it and 8 indices(10,11,12,13,14,15,16,17) above it. It will have to run 10 comparisons  to find the middle terms.

If list has 20 elements, there are two middle terms as  one at would be at 9th index and the one at 10th index .There are 9 indices(0,1,2,3,4,5,6,7,8) below it and 9 indices(11,12,13,14,15,16,17,18,19) above it. It will have to run 11 comparisons  to find the middle terms.

Now this indicates that if the list contains n elements (where n is even) the middle terms are  at index (n-2)/2 & n/2 and the number of comparisons are (n+2)/2.

Part c

So the average number of comparisons is given as

((n+1)/2+(n+2)/2)/2=(2n+3)/4

So the average number of comparisons for a list bearing n elements is 2n+3/4 comparisons.

6 0
3 years ago
How is prior video game experience related to Top Gun scores? Select the correct conlcusion. a. Surgeons who have played some vi
lianna [129]

Answer:

c. Surgeons who have done a lot of video gaming do better at the Top Gun program.

Explanation:

Video gaming is digital entertainment system that mimics real life or fiction action and sport events, controlled digitally by a user or player.

It gaming experience can be brain teasing and procedural. An individual with a prior knowledge of one game, can easily adapt to another and play better as long as the controls has being mastered. A surgeon with no prior knowledge in video gaming, would find it hard to play and would take a reasonable period of time to learn the game.

6 0
3 years ago
Other questions:
  • You know a Linux command will perform a desired function for you, but you cannot remember the full name of the command. You do r
    14·1 answer
  • Which type of network cover a large geographical area and usually consists of several smaller networks, which might use differen
    5·1 answer
  • How to jail break iphone 7 with <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7617023602">[email&#160
    11·2 answers
  • If you are a driver under 21 with a breath or blood alcohol level of ____ or higher, you will be required to attend a substance
    11·2 answers
  • In cell B7, enter a formula without using a function to determine the profit generated at the Downtown location by subtracting t
    9·1 answer
  • What is IaaS? For this service model, what are the resources the cloud vendor will provide/manage and what are the resources the
    15·1 answer
  • Whic flag has a special role in debuging
    6·1 answer
  • Explain how computer system is different from computer in 150 words
    14·1 answer
  • Modify the NumberedList class we implementd during the lecture by adding a member function: void NumberedList::insertPosition(in
    13·1 answer
  • One of the disadvantages of cable technology is that: while it works well for television signals, it is ineffective for data tra
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!