BlackRock Interview Question

implement power function with sub-linear complexity