Grokking the Art of Recursion for Coding Interviews
Ask Author
Back to course home

0% completed

Solution: Pow(x,n)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Problem Statement

Write a Recursive Approach to Calculate Power of Integer to N Pow(x,n).

Given an integer x and an integer n, write a recursive function to calculate the power of x to the nth power.

Example

Sr#xnOutputDescription
125322 raised to the power of 5 equals 32.
234813 raised to the power of 4 equals 81.

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible