What Is The Space Complexity Of The Given Codep Pre Langc #1825

What is the space complexity of the given code?</p> <pre><code class="language-c"> #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; } </code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs122 Data Communication and Computer Network. It can also be found in gs gs122 Recursion - Power of a Number using Recursion in Logn Time - Quiz No.1.


Similar question(s) are as followings:



Online Quizzes of gs122 Data Communication and Computer Network

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background