Uber Interview Question

Write a power function