this give wrong answer i don’t know
CPP - Fast Power
@khemchandrs
You have implemented the algorithms incorrectly.
The recursive call is made to fastPow(x,n/2) while you have made it to fastPow(x*x,n/2); This will produce incorrect results.
Moreover you are required to square the result obtained from this recursive call. Kindly watch the tutorial video again and try writing the algorithm again.