Solution to Pow(x, n) by LeetCode

5 Jun


Question Name: Pow(x, n)

The simplest solution is to use the build-in function “pow” or build-in operation “**” of Python.

A second simple solution is recursive.

Finally, a iterative solution works here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please put your code into a <pre>YOUR CODE</pre> section. Thanks and Happy Coding!