12 2017 档案

摘要:题目描述: Given an integer n, return the number of trailing zeroes in n!. 题目大意: 给定一个整数n,返回n!(n的阶乘)结果中后缀0的个数(如5!=120,则后缀中0的个数为1)。 解题思路: 首先这是LeetCode中时间复杂度为 阅读全文
posted @ 2017-12-18 18:47 Blue_Keroro 阅读(195) 评论(0) 推荐(0)
摘要:[转]从头到尾彻底理解KMP http://blog.csdn.net/v_july_v/article/details/7041827 阅读全文
posted @ 2017-12-05 21:54 Blue_Keroro 阅读(457) 评论(0) 推荐(0)
摘要:1 = 14 = 1 + 39 = 1 + 3 + 516 = 1 + 3 + 5 + 725 = 1 + 3 + 5 + 7 + 936 = 1 + 3 + 5 + 7 + 9 + 11....1+3+...+(2n-1) = (2n-1 + 1)n/2 = n*n 时间复杂度为O(sqrt(n) 阅读全文
posted @ 2017-12-05 19:53 Blue_Keroro 阅读(470) 评论(0) 推荐(0)