how space complexity is O(logn) and using bitmasks it is of order 1?
Q.6 Number theory quiz1
@harry_potter123
Since you’re using recursion
Each calls puts some elements on the stack
So if you count memory stack and since logn calls are made space complexity becomes logn
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
