- 博客(6)
- 收藏
- 关注
原创 02 Number of trailing zeros of N!(求N的阶乘末尾0的数目)
题目描述Write a program that will calculate the number of trailing zeros in a factorial of a given number.N! = 1 * 2 * 3 * 4 … Nzeros(12) = 2 # 1 * 2 * 3 .. 12 = 479001600 that has 2 trailing zeros 479
2016-11-19 17:03:06 507
原创 01 Find the odd int(找到出现次数为奇数的int)
Description:Given an array, find the int that appears an odd number of times. There will always be only one integer that appears an odd number of times.public class FindOdd { public static int findI
2016-11-18 15:59:56 1131
原创 leetcode 14:Longest Common Prefix
【题目】Write a function to find the longest common prefix string amongst an array of strings.我选择使用Java语言【分析】欲求最长公共前缀,首先考虑特殊情况处理(输入的数据有问题)str==null和str.length()==0。继续分析,最好的情况应当是挑出来的第一个字符
2016-05-24 14:03:42 189
原创 leetcode 11:Container With Most Water
【题目】Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin
2016-05-21 17:26:10 239
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人