- 博客(9)
- 收藏
- 关注
原创 Lint Code #9. Fizz Buzz 问题
Lint Code #9. Fizz Buzz 问题[问题地址]:https://www.lintcode.com/problem/fizz-buzz/description解法一:class Solution: """ @param n: An integer @return: A list of strings. """ def fizzBuzz(...
2018-11-29 10:33:20
152
原创 LintCode #8. 旋转字符串
LintCode #8. 旋转字符串[问题地址]:https://www.lintcode.com/problem/rotate-string/description解法一:class Solution: """ @param: str: An array of char @param: offset: An integer @return: nothing...
2018-11-12 10:58:06
179
原创 LintCode #7. 二叉树的序列化和反序列化
LintCode #7. 二叉树的序列化和反序列化[问题地址]:https://www.lintcode.com/problem/serialize-and-deserialize-binary-tree/description解法一:#DFS solutionclass Solution: def serialize(self, root): # write y...
2018-11-12 10:23:09
191
原创 Lint Code #6. 合并排序数组 II
Lint Code #6. 合并排序数组 II[问题地址]:https://www.lintcode.com/problem/merge-two-sorted-arrays/description解法一:class Solution: """ @param A: sorted integer array A @param B: sorted integer array...
2018-11-05 22:34:49
153
原创 Lint Code #5. 第k大元素
Lint Code #5. 第k大元素[问题地址]:https://www.lintcode.com/problem/kth-largest-element/description解法一:class Solution: """ @param n: An integer @param nums: An array @return: the Kth largest...
2018-11-05 22:32:11
132
原创 LintCode #4. 丑数 II
LintCode #4. 丑数 II[问题地址]:https://www.lintcode.com/problem/ugly-number-ii/description解法一:class Solution: """ @param n: An integer @return: the nth prime number as description. """ ...
2018-11-05 22:27:10
178
原创 Lint Code #3. 统计数字
Lint Code #3. 统计数字[问题地址]:https://www.lintcode.com/problem/digit-counts/description解法一:class Solution: """ @param k: An integer @param n: An integer @return: An integer denote the co...
2018-11-05 22:22:18
121
原创 LintCode #2. 尾部的零
LintCode #2. 尾部的零[问题地址]:https://www.lintcode.com/problem/trailing-zeros/description解法一:class Solution: """ @param: n: An integer @return: An integer, denote the number of trailing zeros...
2018-11-05 22:13:37
139
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人