LeetCode050——Pow(x, n)

我的LeetCode代码仓:https://github.com/617076674/LeetCode 原题链接:https://leetcode-cn.com/problems/powx-n/description/ 题目描述: 知识点:二分法 思路:采用递归用二分法的思路计算幂函数 递归终止条件: 如果n为0,直接返回结果1。 递归过程: (1)如果n大于0,设立临时变量temp,计算pow(
相关文章
相关标签/搜索