BlackRock interview question

implement power function with sub-linear complexity