随笔分类 -  Leetcode_Hash Table

摘要:Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i 阅读全文
posted @ 2017-08-09 21:34 mstark 阅读(160) 评论(0) 推荐(0)
摘要: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 example, S = "ADOBECO 阅读全文
posted @ 2017-08-09 21:25 mstark 阅读(172) 评论(0) 推荐(0)
摘要:Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime comple 阅读全文
posted @ 2017-08-05 22:01 mstark 阅读(113) 评论(0) 推荐(0)
摘要:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled wit 阅读全文
posted @ 2017-08-04 15:04 mstark 阅读(325) 评论(0) 推荐(0)
摘要:You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca 阅读全文
posted @ 2017-08-02 23:56 mstark 阅读(255) 评论(0) 推荐(0)
摘要:HashMap的应用可以提高查找的速度,键key,值value的使用拜托了传统数组的遍历查找方式,对于判断一个字符或者字符串是否已经存在的问题可以非常好的解决。而本题需要解决的问题就是判断新遍历到的字符是否已经存在于左left,右right,字符构成的子串之中。 解题思路:设置一个left作为子串的 阅读全文
posted @ 2017-07-31 21:56 mstark 阅读(205) 评论(0) 推荐(0)