摘要: Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in polynomial time complexity.题目大意:给定一个整数n,返回n!(n的阶乘)数字中的... 阅读全文
posted @ 2015-12-17 16:53 伟大的臭猪猪 阅读(556) 评论(0) 推荐(0)
摘要: GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2015-12-17 16:02 伟大的臭猪猪 阅读(277) 评论(0) 推荐(0)
摘要: Link:http://www.cnblogs.com/Gavin_Liu/archive/2011/04/13/2011214.htmlKeywords: Dynamic Programming; Recursive Methods[为什么写这类文章]漫谈算法(零)序[这系列文章里会用到的一下符号... 阅读全文
posted @ 2015-12-17 11:12 伟大的臭猪猪 阅读(297) 评论(0) 推荐(0)
摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2015-12-17 11:11 伟大的臭猪猪 阅读(180) 评论(0) 推荐(0)