2015年9月15日
摘要: Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For examp... 阅读全文
posted @ 2015-09-15 21:56 星空守望者--jkmiao 阅读(158) 评论(0) 推荐(0)
摘要: Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]retur... 阅读全文
posted @ 2015-09-15 20:58 星空守望者--jkmiao 阅读(188) 评论(0) 推荐(0)
摘要: Follow upforH-Index: What if thecitationsarray is sorted in ascending order? Could you optimize your algorithm?class Solution(object): def hIndex(s... 阅读全文
posted @ 2015-09-15 20:29 星空守望者--jkmiao 阅读(377) 评论(0) 推荐(0)