上一页 1 2 3 4 5 6 ··· 12 下一页

LeetCode-128-Longest Consecutive Sequence

摘要: 算法描述: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. 阅读全文
posted @ 2019-02-17 18:34 无名路人甲 阅读(85) 评论(0) 推荐(0) 编辑

LeetCode-115-Distinct Subsequences

摘要: 算法描述: Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which 阅读全文
posted @ 2019-02-15 20:14 无名路人甲 阅读(109) 评论(0) 推荐(0) 编辑

LeetCode-99-Recover Binary Search Tree

摘要: 算法描述: Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Example 2: Follow 阅读全文
posted @ 2019-02-15 19:12 无名路人甲 阅读(133) 评论(0) 推荐(0) 编辑

LeetCode-97-Interleaving String

摘要: 算法描述: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1: Example 2: 解题思路:动态规划题。s3中的字符要么与s1中的字符相同,要么与s2中的字符相同。 递推 阅读全文
posted @ 2019-02-15 17:50 无名路人甲 阅读(147) 评论(0) 推荐(0) 编辑

LeetCode-87-Scramble String

摘要: 算法描述: 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 repres 阅读全文
posted @ 2019-02-15 16:32 无名路人甲 阅读(97) 评论(0) 推荐(0) 编辑

LeetCode-85-Maximal Rectangle

摘要: 算法描述: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example: 解题思路:利用直方图最大面积求解, 阅读全文
posted @ 2019-02-15 15:39 无名路人甲 阅读(87) 评论(0) 推荐(0) 编辑

LeetCode-84-Largest Rectangle in Histogram

摘要: 算法描述: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in th 阅读全文
posted @ 2019-02-14 12:47 无名路人甲 阅读(105) 评论(0) 推荐(0) 编辑

LeetCode-76-Minimum Window Substring

摘要: 算法描述: 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). Example: Note: If t 阅读全文
posted @ 2019-02-14 09:32 无名路人甲 阅读(75) 评论(0) 推荐(0) 编辑

LeetCode-68-Text Justification

摘要: 算法描述: Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) 阅读全文
posted @ 2019-02-13 20:58 无名路人甲 阅读(118) 评论(0) 推荐(0) 编辑

LeetCode-72-Edit Distance

摘要: 算法描述: Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations p 阅读全文
posted @ 2019-02-13 19:45 无名路人甲 阅读(92) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页