Question 8 Consider a recursive function de cTOBin (decimal) that converts a decimal number to a binary representation but still in base 10. Note that all inputs and output are 32-bit integers....


Question 8<br>Consider a recursive function de cTOBin (decimal) that converts a decimal number to a binary representation but<br>still in base 10. Note that all inputs and output are 32-bit integers.<br>Example outputs:<br>decToBin (7) = 111 (one hundred and eleven)<br>decToBin (23) = 10111 (ten thousand, one hundred and eleven)<br>decToBin (18) = 10010 (ten thousand and ten)<br>What is the time complexity of decTOBin?<br>O(logn)<br>O(2^n)<br>None of the other answers are correct<br>O(n)<br>O(1)<br>

Extracted text: Question 8 Consider a recursive function de cTOBin (decimal) that converts a decimal number to a binary representation but still in base 10. Note that all inputs and output are 32-bit integers. Example outputs: decToBin (7) = 111 (one hundred and eleven) decToBin (23) = 10111 (ten thousand, one hundred and eleven) decToBin (18) = 10010 (ten thousand and ten) What is the time complexity of decTOBin? O(logn) O(2^n) None of the other answers are correct O(n) O(1)

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here