I am not good at determining time and memory complexities and would appreciate it if someone could help me out.
I have an algorithm, here and I am not sure what its time and memory complexities would be.
Function sample(k)
IF k < 2
Return 0
Return 1 + sample(k/2)
What is its time and memory complexity and why?
Thanks