摘要:
Description:Count the number of prime numbers less than a non-negative number,n.Credits:Special thanks to@mithmattfor adding this problem and creating... 阅读全文
posted @ 2015-07-27 19:17 骄阳照林 阅读(109) 评论(0) 推荐(0)
|
|
|
|
摘要:
Description:Count the number of prime numbers less than a non-negative number,n.Credits:Special thanks to@mithmattfor adding this problem and creating... 阅读全文
posted @ 2015-07-27 19:17 骄阳照林 阅读(109) 评论(0) 推荐(0)
摘要:
Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3 --... 阅读全文
posted @ 2015-07-27 15:50 骄阳照林 阅读(138) 评论(0) 推荐(0)
摘要:
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer... 阅读全文
posted @ 2015-07-27 15:27 骄阳照林 阅读(105) 评论(0) 推荐(0)
摘要:
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 yo... 阅读全文
posted @ 2015-07-27 14:33 骄阳照林 阅读(120) 评论(0) 推荐(0)
摘要:
Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl... 阅读全文
posted @ 2015-07-27 13:03 骄阳照林 阅读(98) 评论(0) 推荐(0) |
|