题目链接:Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given “25525511135”,retu...
More »
题目链接:Reverse Linked List IIReverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n...
More »
题目链接:Decode WaysA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded...
More »
题目链接:Subsets IIGiven a collection of integers that might contain duplicates, S, return all possible subsets.Note: Elements in a subset must be in non-descending order...
More »
题目链接:Gray CodeThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number ...
More »
题目链接:Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or...
More »
题目链接:Scramble StringGiven a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representa...
More »
题目链接:Partition ListGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the...
More »
题目链接:Maximal RectangleGiven a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area.这道题的要求是在0-1矩阵中找出面积最大的全1矩阵。 ...
More »
题目链接:Largest Rectangle in HistogramGiven n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rec...
More »