- 博客(7)
- 收藏
- 关注
原创 Leetcode:Recover Binary Search Tree
urlhttps://leetcode.com/problems/recover-binary-search-tree/description/题目大意:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure. Note: A
2017-10-29 13:11:13 227
原创 Leetcode:Interleaving String
Url:https://leetcode.com/problems/interleaving-string/description/描述:Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example, Given: s1 = “aabcc”, s2 = “dbbca”,When
2017-10-22 18:39:35 181
原创 Leetcode : Scramble String
URL :https://leetcode.com/problems/scramble-string/description/描述:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possibl
2017-10-06 13:12:22 280
原创 Leetcode : Restore IP Addresses
URLhttps://leetcode.com/problems/restore-ip-addresses/description/描述:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:
2017-10-06 13:03:10 228
原创 Leetcode:Maximal Square & Maximal Rectangle
url : https://leetcode.com/problems/maximal-square/description/url : https://leetcode.com/problems/maximal-rectangle/description/解题思路: Maximal Square 此题相对简单,使用动态规划。 matrix[i,j]==0时, dp[i,j]=0; matrix[
2017-10-05 16:53:33 291
原创 leetcode: Minimum Window Substring
url :https://leetcode.com/problems/minimum-window-substring/description/描述Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For
2017-10-04 10:46:54 263
原创 Leetcode : Sqrt
url :https://leetcode.com/problems/sqrtx/description/描述Implement int sqrt(int x). Compute and return the square root of x.思路二分法代码/**
2017-10-03 10:31:39 215
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人