Write a program to calculate pow(x,n) – Divide and Conquer – Above function can be optimized to O(logn) by calculating power(x, y/2) only once and storing it.
implement power function leetcode
1 Article
1
Write a program to calculate pow(x,n) – Divide and Conquer – Above function can be optimized to O(logn) by calculating power(x, y/2) only once and storing it.