Question
What is the time complexity for converting decimal to binary numbers?
Answer: Option C
Was this answer helpful ?
Since each time you are halving the number, it can be related to that of a binary search algorithm, hence the complexity is O(logn).
Was this answer helpful ?
Submit Solution