摘要: 题目 Count the number of prime numbers less than a non negative number, n. Example: Input: 10 Output: 4 Explanation: There are 4 prime numbers less than 阅读全文
posted @ 2018-10-12 11:59 shinjia 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 题目 Remove all elements from a linked list of integers that have value val. Example: Input: 1 2 6 3 4 5 6, val = 6 Output: 1 2 3 4 5 解法 思路 思路不难。。。就是很繁琐 阅读全文
posted @ 2018-10-12 10:16 shinjia 阅读(90) 评论(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 int 阅读全文
posted @ 2018-10-12 09:26 shinjia 阅读(120) 评论(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 阅读全文
posted @ 2018-10-12 08:27 shinjia 阅读(136) 评论(0) 推荐(0) 编辑