Question: Explain how divide and conquer strategy can be used to calculate power of a number in O(log(n)) time. Example, power(5,2) = 25, power(2,7) = 128.

Explain how divide and conquer strategy can be used to calculate power of a number in O(log(n)) time.

Example, power(5,2) = 25, power(2,7) = 128.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!