✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Given the following pseudocode, derive the recurrence relation that represents its time complexity.
def count_digits(n):
if n < 10:
return 1
return 1 + count_digits(n // 10)
Let b and c represent constant values. What is the base case and recurrence step?