subject

Time complexity gives a rough idea of how long it will take for an algorithm to execute based on two things: the size of the input it has and the amount of steps it takes to complete,

whereas space complexity is also the amount of memory required to execute an algorithm based

on the size of input it has or given.

Using mathematical notations or diagrams critically explain the time and space complexity of the

code below. 10 marks

int a = 0;

for (i = 0; i < N; i++) {

for (j = N; j > i; j--) {

a = a + i + j;

}

}​

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 24.06.2019 16:30
Which program can damage your computer?
Answers: 1
You know the right answer?
Time complexity gives a rough idea of how long it will take for an algorithm to execute based on t...
Questions
question
Mathematics, 01.08.2019 03:30
question
English, 01.08.2019 03:30
question
English, 01.08.2019 03:30
Questions on the website: 13722360