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.
c program to find power of a number without using pow function
1 Article
1