描述
Reverse digits of an integer.
Example1: x = 123, return 321Example2: x = -123, return -321
Have you thought about this?Here are some good questions
...
描述
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.
OJ’s undirected graph serialization:Nodes are label
...
描述
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all suc
...
描述
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
F
...
描述
Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed fro
...
描述
A message containing letters from A-Z is being encoded to numbers using the following mapping:
‘A’ -> 1‘B’ -> 2…‘Z’ -> 26Given an encoded
...
描述
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You ha
...
描述
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its pat
...
描述
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible represent
...
描述
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
For example,Given:s1 = “aabcc”,s2 = “dbbca”,
When s3 = “aadbbcbcac”,
...
描述
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area.
分析这道题难度颇大,主题人出来我保证不打死你,双向动态规
...
描述
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [−2,1,−3,4,−1
...
描述
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the
...
描述
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endp
...
描述
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters
...