
喜刷刷喜刷刷
AnillegalName
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode172
最近开始刷LeetCode,先从easy的刷起,但发现easy的也有点麻烦(好弱呀)。(刚刚计star进实验室发现了我不会用盲打,Orz。。。) 题目Factorial Trailing Zeroes,就是计算n!后面有几个0的。我开始是这样想的,n!可以看做多个质数的相乘,而末尾的0必定是2*5得到的,所以算出与n!等价的质数乘积的式子中有几个2和几个5,取最小值即可。后来发现2的个数必定大于原创 2015-03-30 20:09:05 · 506 阅读 · 0 评论 -
LeetCode169 Majority Element
原题目: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority原创 2015-04-08 14:55:40 · 554 阅读 · 0 评论