上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
摘要: 题目描述: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the qua 阅读全文
posted @ 2016-02-20 22:10 scottwang 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 阅读全文
posted @ 2016-02-19 22:33 scottwang 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Description: Count the number of prime numbers less than a non-negative number, n. 解题思路: Let's start with a isPrime function. To determine if a 阅读全文
posted @ 2016-02-19 22:09 scottwang 阅读(494) 评论(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 cana 阅读全文
posted @ 2016-02-18 22:45 scottwang 阅读(531) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1 阅读全文
posted @ 2016-02-18 21:58 scottwang 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 解题思路: 使用StringBuilder,且使用进位。 代码如下: p 阅读全文
posted @ 2016-02-15 20:18 scottwang 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 解题思路: 使用O(n)的时间复杂度及O(1)的时间复杂 阅读全文
posted @ 2016-02-06 19:43 scottwang 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1- 阅读全文
posted @ 2016-02-06 16:01 scottwang 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 -- 阅读全文
posted @ 2016-02-06 15:34 scottwang 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a 阅读全文
posted @ 2016-02-06 14:31 scottwang 阅读(265) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页