public int power(int n, int m){
        if(m == 0){
            return 1;
        }
        int pow = power(n,m/2);
        if(m % 2 ==0){
            return pow*pow;
        }else{
            return n*pow*pow;
        }
    }
Date 03/13/2016
@author Tushar Roy

Find power of 2 numbers.

Time complexity O(logn)
Space complexity O(1)

https://leetcode.com/problems/powx-n/
http://www.geeksforgeeks.org/write-a-c-program-to-calculate-powxn/
src/com/interview/number/PowerFunction.java