LinkedIn Interview Question

Implement the power function.