Question
In algorithms, what is the Big-O time complexity of below algorithms (note: below code does nothing useful, it is just to test your Big-O knowledge):
a = 5
b = 6
c = 10
for i in range(n):
for j in range(n):
x = i * i
y = j * j
z = i * j
for k in range(n):
w = a * k +45
v = b * b
d = 33
In your answer, show how you get to the final answer (i.e. you should show the intermediate step before getting to final answer).
3n^2 + 2n + 4 = O(n^2)

Question
In algorithms, what is the Big-O time complexity of below algorithms (note: below code does nothing useful, it is just to test your Big-O knowledge):
a = 5
b = 6
c = 10
for i in range(n):
for j in range(n):
x = i * i
y = j * j
z = i * j
for k in range(n):
w = a * k +45
v = b * b
d = 33
In your answer, show how you get to the final answer (i.e. you should show the intermediate step before getting to final answer).
?

Question
In algorithms, what is the Big-O time complexity of below algorithms (note: below code does nothing useful, it is just to test your Big-O knowledge):
a = 5
b = 6
c = 10
for i in range(n):
for j in range(n):
x = i * i
y = j * j
z = i * j
for k in range(n):
w = a * k +45
v = b * b
d = 33
In your answer, show how you get to the final answer (i.e. you should show the intermediate step before getting to final answer).
3n^2 + 2n + 4 = O(n^2)
If you want to change selection, open document below and click on "Move attachment"

#### pdf

owner: kkhosravi - (no access) - ProblemSolvingwithAlgorithmsandDataStructures.pdf, p51

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions