Why do we use Divide and Conquer to calculate x to the power of y?

后端 未结 0 1884
刺人心
刺人心 2020-12-11 23:11

If I need x to the power of y why can\'t I simply do pow(x, y) (in C or C++) instead of a D&C recursive algorithm that is significantly harder

相关标签:
回答
  • 消灭零回复
提交回复
热议问题