Amazon interview question

Implement Math.pow(a, b) in java.

Interview Answer

Anonymous

23 Sept 2015

1. Use recursion, be careful of edge cases with negatives and 0. 2. Improve efficiency by using properties of powers

6