LeetCode --- 93. Restore IP Addresses Mar 7, 2015

 Tags LeetCode , C++ , 回溯 , 字符串

题目链接:Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given “25525511135”,retu... More »

0条评论

LeetCode --- 92. Reverse Linked List II Mar 7, 2015

 Tags LeetCode , C++ , 链表

题目链接: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 »

0条评论

LeetCode --- 91. Decode Ways Mar 6, 2015

 Tags LeetCode , C++ , 动态规划 , 字符串

题目链接: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 »

0条评论

LeetCode --- 90. Subsets II Mar 5, 2015

 Tags LeetCode , C++ , 数组 , 回溯

题目链接: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 »

0条评论

LeetCode --- 89. Gray Code Mar 5, 2015

 Tags LeetCode , C++ , 回溯

题目链接: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 »

0条评论

LeetCode --- 88. Merge Sorted Array Mar 5, 2015

 Tags LeetCode , C++ , 数组 , 双指针

题目链接: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 »

0条评论

LeetCode --- 87. Scramble String Mar 5, 2015

 Tags LeetCode , C++ , 动态规划 , 字符串

题目链接: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 »

0条评论

LeetCode --- 86. Partition List Mar 5, 2015

 Tags LeetCode , C++ , 链表 , 双指针

题目链接: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 »

0条评论

LeetCode --- 85. Maximal Rectangle Mar 4, 2015

 Tags LeetCode , C++ , 数组 , Hash表 , , 动态规划

题目链接: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 »

0条评论

LeetCode --- 84. Largest Rectangle in Histogram Mar 3, 2015

 Tags LeetCode , C++ , 数组 ,

题目链接: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 »

0条评论