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
zhuklara [117]
3 years ago
7

Give a big-O estimate for the number additions used in this segment of an algorithm.

Computers and Technology
1 answer:
rjkz [21]3 years ago
3 0
Big-O notation is a way to describe a function that represents the n amount of times a program/function needs to be executed. 

(I'm assuming that := is a typo and you mean just =, by the way) 

In your case, you have two loops, nested within each other, and both loop to n (inclusive, meaning, that you loop for when i or j is equal to n), and both loops iterate by 1 each loop.

This means that both loops will therefore execute an n amount of times. Now, if the loops were NOT nested, our big-O would be O(2n), because 2 loops would run an n amount of times.

HOWEVER, since the j-loop is nested within i-loop, the j-loop executes every time the i-loop <span>ITERATES. 
</span>
As previously mentioned, for every i-loop, there would be an n amount of executions. So if the i-loop is called an n amount of times by the j loop (which executes n times), the big-O notation would be O(n*n), or O(n^2). 

(tl;dr) In basic, it is O(n^2) because the loops are nested, meaning that the i-loop would be called n times, and for each iteration, it would call the j-loop n times, resulting in n*n runs.

A way to verify this is to write and test program the above. I sometimes find it easier to wrap my head around concepts after testing them myself.
You might be interested in
On a wireless router, what gives out IP addresses?<br> DHCP<br> DNS<br> WPA<br> WPS
attashe74 [19]

Answer:

DHCP

Explanation:

The only option can give IP addresses is the DHCP The Dynamic Host Configuration Protocol, because the DNS (Domain Name System) only translates IP addresses to a hostname, and WPS (Wi-Fi Protected Setup) or WPA (Wi-Fi Protected Access) if for security network, doesn't matter if is a wireless router, in a network always DHCP gives the IP addresses.

7 0
2 years ago
This rights protected document cannot be opened because the rights management feature has been disabled on your machine by Polic
erastovalidia [21]

This rights protected document cannot be opened because the rights management feature has been disabled on your machine by Policy is known to be an error message.

<h3>What is the error message about?</h3>

The Error message above is known to be one that shows that  your IT department has made a group policy in one's company's Active Directory. It is known to be one that tends to disables the use of ADRMS (Rights Management Feature) in all to all users.

Note that in the case above, one need to ask your IT department to be able to disable or make changes to the group policy so that it will not apply to the users who are said to require access secured Microsoft Office documents in any of Ansarada Rooms.

Another option is to look at documents off the network with the use of a personal computer or a mobile phone.

Hence, This rights protected document cannot be opened because the rights management feature has been disabled on your machine by Policy is known to be an error message.

Learn more about  error message from

brainly.com/question/25671653

#SPJ1

4 0
1 year ago
Su prepares a presentation about the industrial revolution. She wants to change the font on the second slide of
tatyana61 [14]

Answer:

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

Explanation:

Sue prepares a presentation about the industrial revolution. She wants to change the font on the second slide of her presentation. She can accomplish this task with the following option.

By using Font dialog box

Using this option, first, she needs to select the whole second line, as the line gets selected, font dialog box get appear, wherefrom she can change the font to any available font style, size. In this font dialog box, she can also increase and decrease the font, change the font color and can make font bold, italic and underline.

By using the Font drop-down menu

Using this option, first, she needs to select the second line of her slide. Then, go to the Home tab, under Font group section, she can change the font style, size, color and increase spacing, etc.

Why other options are not correct.

<em>By using the mini toolbar</em>

mini toolbar does not have the option that directly allows you to change the font

<em>By using paragraph option</em>

Using this option, you can only modify the paragraph setting, but not the font. Using this option, you can align the text of paragraph to center, left, right and justify, you can do numbering, add or remove the column, and make text direction.

<em>By using WordArt options</em>

Using this option, you can insert WordArt, these styles are predefined and don't allow you to change the font.

6 0
2 years ago
Read 2 more answers
Jacinta registered herself on a social-networking site. She receives one or two emails every day about promotional offers as wel
Rainbow [258]
It would be Spam. . . . 

3 0
3 years ago
Describing Work Activities for Architects
Fiesta28 [93]

Answer:

inspecting equipment, structures, or material

performing general physical activities

getting information

Explanation: i just did it soooo :]

3 0
3 years ago
Read 2 more answers
Other questions:
  • A ____ is a data network connection that makes use of the public telecommunications infrastructure but maintains privacy through
    13·1 answer
  • The systems development life cycle (SDLC) is the overall process of developing, implementing, and retiring information systems t
    9·1 answer
  • Password combined with pin used as an authentication requirement is an example of:
    6·1 answer
  • 1. Why do you think coding languages generally include the ability to create comments? What would those comments be used for? In
    10·1 answer
  • What is a computer network that provides connectivity in a geographic area or region larger than that covered by a local area ne
    7·1 answer
  • Which one my guys I need help
    7·1 answer
  • CS160 Computer Science I In class Lab 10
    15·1 answer
  • Which of the following correctly orders the units of measure from least to greatest?
    7·2 answers
  • 1. List three tabs that make up the Ribbon
    14·1 answer
  • Name the major types of computer systems from slowest to fastest. ​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!