Select the correct option to test your answer:
Computer
Miscellaneous On Data Structures
Difficulty: Medium
What is the space complexity of the given code? #include<stdio.h> int power(int x, int y) { if (y == 0) return 1; else if (y%2 == 0) return power(x, y/2)*power(x, y/2); else return x*power(x, y/2)*power(x, y/2); } int main() { int x = 2; int y = 3; printf("%d", power(x, y)); return 0; }
More Computer Questions
What will be the order of elements of the array arr = {23, 67, 143, 654, 43} after first iteration of MSD sort is complete?
What is the time complexity of delete function in the hash table using a doubly linked list?
How many specifiers are used to derive a class?
A chart can be put as a part of the presentation using_______________ in Ms PowerPoint?
Where can you change the vertical alignment?