implement power algorithm using divide and conqure