Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:
其他好文 时间:
2018-10-06 13:14:18
阅读次数:
139
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: ...
分类:
其他好文 时间:
2018-10-05 13:54:00
阅读次数:
168
Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2018-10-03 23:38:19
阅读次数:
154
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2018-10-03 21:54:52
阅读次数:
120
Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq ...
分类:
其他好文 时间:
2018-10-02 14:20:32
阅读次数:
165
Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. For example,Assume that words = ...
分类:
其他好文 时间:
2018-10-02 14:00:51
阅读次数:
174
Given an array of size n, find the majority element. The majority element is the element that appears more than? n/2 ? times. You may assume that the ...
分类:
编程语言 时间:
2018-09-29 21:30:14
阅读次数:
158
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Example 2: AC code: ...
分类:
其他好文 时间:
2018-09-27 22:57:36
阅读次数:
173
Description: Given a 32-bit signed integer, reverse digits of an integer. Note: Assume we are dealing with an environment which could only store integ ...
分类:
其他好文 时间:
2018-09-27 01:37:06
阅读次数:
162
Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Example: 给2个稀疏矩阵,返回矩阵相乘的 ...
分类:
其他好文 时间:
2018-09-23 18:23:15
阅读次数:
206