Questions: Time and Space Complexity

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

An algorithm contains a loop that runs n times, and inside that loop another loop that runs log n times. What is its time complexity?

AO(n)
BO(log n)
CO(n log n)
DO(n²)
Question 2 True / False

Big-O notation typically describes the worst-case running time of an algorithm.

TTrue
FFalse
Question 3 Short Answer

Why might you choose an algorithm with higher time complexity if it has lower space complexity?

Think about your answer, then reveal below.