Home / MCQ Bank / Computer
Computer Miscellaneous On Data Structures Difficulty: Medium

What is the time complexity of the recursive implementation used to convert a decimal number to its binary equivalent? #include<stdio.h> int arr[31], len = 0; void recursive_dec_to_bin(int n) { if(n == 0 && len == 0) { arr[len++] = 0; return; } if(n == 0) return; arr[len++] = n % 2; recursive_dec_to_bin(n/2); }

Select the correct option to test your answer:

More Computer Questions

What will be the output of the following Python code snippet? print('HelloWorld'.istitle()) In C++, can you overload the return type of a function? What is the correct way to define a method named GetSquare that takes an integer parameter num and returns its square in C#? What is the purpose of the complex() function in Python? Which of the following attribute of form tag is not set by using document object in JavaScript?