Skip to main content
← CoursesInterview PrepModule 4 · Dynamic Programming & HeapBig-O proof: Master Theorempredict63 / 100
💬 Discuss🧪 Playground+75 XP
Task
📝 **Question:** What's the asymptotic complexity of T(n) = 4T(n/2) + O(n²)? Type the answer in the form O(n^k) or O(n^k log n). 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.

Keep going

🔮 Predict the output

Read the code carefully

# Recurrence: T(n) = 4·T(n/2) + O(n²)
# Master Theorem: a=4, b=2, d=2 → a/b^d = 4/4 = 1 → Case 2
# Answer: ?
print('O(n^2 log n)')

What will the program print? Write here:

📣 Help someone learn PythonShare this lesson with a friend — the first 15 are free, no signup.Tweet

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…