Fork me on GitHub
摘要: 题目: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 ex... 阅读全文
posted @ 2015-08-22 20:42 __Neo 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: P... 阅读全文
posted @ 2015-08-22 19:28 __Neo 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 题目:Description:Count the number of prime numbers less than a non-negative number,n.提示:求素数个数的比较快速的方法是“埃拉托斯特尼筛法”,其原理很简单,具体的解释可以点击该链接。代码:一个简单的“埃拉托斯特尼筛法”实... 阅读全文
posted @ 2015-08-22 18:40 __Neo 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], [... 阅读全文
posted @ 2015-08-22 16:35 __Neo 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 题目:Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of... 阅读全文
posted @ 2015-08-22 12:09 __Neo 阅读(358) 评论(0) 推荐(0) 编辑