package
0.0.0-20210525112244-a601ee6fe7cf
Repository: https://github.com/smartsyoung/leetcode-in-go.git
Documentation: pkg.go.dev

# README

50. Pow(x, n)

题目

Implement pow(x, n).

解题思路

注意到指数是整数,所以,可以利用乘法计算幂

总结

o(N)的算法会浪费很多时间,o(lgN)的算法要快的多。