LinkedIn Interview Question

Implement pow function.