Power x^n in O(logN)

Divide and Conquer solution to x^n calculation
Week 1: Stanford’s “Algorithms: Design and Analysis, Part 1
by Tim Roughgarden” on coursera.