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 00:00
Sam is a data analyst at an advertising firm. he often uses a spreadsheet that contains media ratings details. he would like to filter the spreadsheet data based on different filter criteria. which operators can he use to specify the combination of filter criteria? sam can use the ( blank ) operators to specify a combination of filter criteria.
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
What is used to analyze and summarize your data without graphical support
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
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, 11.10.2020 14:01
question
Mathematics, 11.10.2020 14:01
question
English, 11.10.2020 14:01
Questions on the website: 13722363