Could you please explain to me how to properly calculate the O(n) of the Karatsuba Algorithm?
I have read that it is equal to O(n^log_2(3))
but I still do not understand how to derive the value.
First of all, I am a bit confused that the input length is represented as n
instead of n + m
, but I guess it's just to cut short.
I understand that an operation is being executed for every digit, that's why it is n
. But could you explain to me how is log_2(3)
calculated and why is it O(n^log_2(3))
and not O(n log_n(3))
?