![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 89
会coding的加菲猫
这个作者很懒,什么都没留下…
展开
-
LeetCode | Length of Last Word
题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A原创 2015-05-21 09:04:26 · 174 阅读 · 0 评论 -
LeetCode | House Robber
题目You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjace原创 2015-05-21 14:19:56 · 252 阅读 · 0 评论 -
LeetCode | Count Primes
题目Description:Count the number of prime numbers less than a non-negative number, n分析和思路题目分为两个部分:1)素数的判断;2)找出所有小于n的素数。素数的判断比较容易,而n以内素数的筛选用到了Sieve of EratosthenesOK,代码如下:原创 2015-05-21 08:59:02 · 248 阅读 · 0 评论 -
LeetCode | Valid Palindrome
题目Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" i原创 2015-05-21 08:48:46 · 301 阅读 · 0 评论 -
LeetCode | Number of 1 Bits
题目Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representat原创 2015-05-21 16:40:44 · 278 阅读 · 0 评论 -
LeetCode | Isomorphic Strings
题目Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replac原创 2015-05-22 21:18:35 · 274 阅读 · 0 评论