2) What is the time complexity of the following two algorithms? Express your answer in terms of Big-O notation and prov

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

2) What is the time complexity of the following two algorithms? Express your answer in terms of Big-O notation and prov

Post by answerhappygod »

2) What is the time complexity of the following two
algorithms? Express your answer in terms of Big-O notation and
provide simple steps of your derivation.
# algorithm A
for i in range(100, n):
for j in range(n, 100):
print(i,j)
# algorithm B
for i in range(0, n):
for j in range(0, n, 10):
print(i,j)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply