Visier Interview Question

Implement pow func in O(log n), implement a cache.