landonreed1834 landonreed1834
  • 22-02-2024
  • Computers and Technology
contestada

what will be the time complexity of the following code?
int xpowy(int x, int n)
{
if (n==0)
return 1;
if (n==1)
return x;
if ((n ) == 0)
return xpowy(x*x, n/2);
else
return xpowy(x*x, n/2) * x;
}
a. ( logn)
b. (n)
c. (nlogn)
d. (n∗n)

Respuesta :

Otras preguntas

Food that is cooked properly can no longer be contaminated. true or false
The most penetrating type of radiation is _____ radiation. a. positron b. beta c. alpha d. gamma
What is the common name of the group whose members are characterized by exoskeletons and a unique water vascular system? a. brachiopods b. medusas c. echinoder
Who is the father of psychology
21/49 in lowest terms
The sales tax rate is 4%. If the sales tax on a 10-speed bicycle is $6, what is the purchase price?
Hemophilia is an X-linked recessive disorder (Xh) that is passed through generations and can be traced by using a pedigree.
What was the “St. Louis Affair"?
Mention two successful (prominent) entrepreneurs in south africa and briefly discuss their role in our society
What is Reimbursement?