IncredibleThings

导航

2016年7月12日 #

LeetCode-Ugly Number

摘要: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since i... 阅读全文

posted @ 2016-07-12 22:04 IncredibleThings 阅读(132) 评论(0) 推荐(0)

LeetCode-First Bad Version

摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on th... 阅读全文

posted @ 2016-07-12 22:02 IncredibleThings 阅读(135) 评论(0) 推荐(0)

LeetCode-Add Digits

摘要: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one di... 阅读全文

posted @ 2016-07-12 05:07 IncredibleThings 阅读(112) 评论(0) 推荐(0)