Question: What is the Big-O time complexity of the conversion function in terms of n ? // Description // number is a positive integer with n
What is the Big-O time complexity of theconversionfunction in terms ofn?
// Description // number is a positive integer with n digits, where numberirefers to the ithdigit of number // n is the number of digits of c // base is a positive integer
function conversion(number,base,n) value = 0; unit = 1; for i = 0 to n value = value + numberi* unit; unit = unit * base; end return value;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
