打卡,第7天 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and…

打卡第三天!!! 今天刷的题是 Pow(x,n) implement pow(x,n) 题目相当简洁,看起来好像也不会很难的样子,不过他竟然是一道 Medium 的题目(万万没想到). pow(x,n) 大家应该都多少有接触过,就是求x的n次方嘛。 我们可以把n分成三种情况去考虑: n > 0 : 可以转化成求 myPow(1/x,-n) n == 0 :直接 return 1 即可 n…

本站总访问量次 本站访客数人次

Design by wuxiaobai24. Power by Gatsby.js. The website content is licensed CC BY NC SA 4.0.

You can find the source code in Github.