Iterative logarithmic exponentiation
0 Answers
Iterative logarithmic exponentiation
| Flag | PURGE
Write an interative O(lg n) algorithm for finding the power of x^y (x is a double, y>0 is an int).
I first did the recursive divide and conquer one and tried to convert it to iterative... and I couldn't :S
Is there a method to convert recursion to iterative (it is easy for tail recursion) ?
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.