摘要:
题目描述: 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 阅读全文
摘要:
题目描述: 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"]. 阅读全文
摘要:
题目描述: 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 阅读全文
摘要:
题目描述: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a cana 阅读全文
摘要:
题目描述: 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 阅读全文
摘要:
题目描述: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 解题思路: 使用StringBuilder,且使用进位。 代码如下: p 阅读全文
摘要:
题目描述: 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)的时间复杂 阅读全文
摘要:
题目描述: 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- 阅读全文
摘要:
题目描述: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 -- 阅读全文
摘要:
题目描述: 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 阅读全文