LeetCode
LoveAtYourDarkest
这个作者很懒,什么都没留下…
展开
-
136 single number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using e原创 2015-01-07 22:40:58 · 174 阅读 · 0 评论 -
LeetCode 172 Factorial Trailling Zeros
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 思路:算出前n个数分解质因数后的5的幂的次数和 class Solution { public: int trai原创 2015-01-07 16:12:06 · 273 阅读 · 0 评论