Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAlgo #1701
Algo #1701
Comments
Fixes TheAlgorithms#1701 The old algorithm used recursion which takes O(n) time to run, being n the exponent. This new algorithm uses the paradigm of `divide and conquer` with a time complexity of O(log n) and space complexity of O(1). This is a reimplementation of https://www.geeksforgeeks.org/write-a-c-program-to-calculate-powxn/ but this will only work with positive exponent since the signature of the function only allow natural numbers.
No description provided.