
Hash Table
Peng_maple
这个作者很懒,什么都没留下…
展开
-
[LeetCode] 1. Two Sum
Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use th...原创 2019-03-24 14:45:58 · 208 阅读 · 0 评论 -
[leetcode] 76. Minimum Window Substring
Minimum Window SubstringGiven 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:Input: S = “ADOBECODEBANC”, T = “ABC”Ou...原创 2019-07-21 15:09:25 · 135 阅读 · 0 评论 -
[leetcode] 127. Word Ladder
Word LadderGiven two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that:Only one letter can be chan...原创 2019-08-14 22:19:40 · 116 阅读 · 0 评论 -
[leetcode] 149. Max Points on a Line
Max Points on a LineGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.Example 1:Input: [[1,1],[2,2],[3,3]]Output: 3Explanation:^|| o| ...原创 2019-08-24 21:36:53 · 198 阅读 · 0 评论 -
[leetcode] 128. Longest Consecutive Sequence
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example:Input: [100, 4...原创 2019-08-12 21:56:05 · 124 阅读 · 0 评论