HashTable
文章平均质量分 60
NoooName
这个作者很懒,什么都没留下…
展开
-
[Leetcode]4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: Element原创 2015-01-28 16:09:27 · 337 阅读 · 0 评论 -
[Leetcode]Anagrams
Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 如果两个单词所包含的字符和数量都是一样的,只是顺序不同,那么就为anagrams~如果是判断两个单词是否为anagrams,有两种解法:一种是用第一个词建立h原创 2015-01-29 14:22:47 · 373 阅读 · 0 评论 -
[Leetcode]Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without原创 2015-03-13 05:20:21 · 419 阅读 · 0 评论 -
[Leetcode]Longest Substring with At Most Two Distinct Characters
Given a string S, find the length of the longest substring T that contains at most two distinct characters. For example, Given S = “eceba”, T is "ece" which its length is 3. 给定一个字符串S,找到最长原创 2015-03-18 04:54:02 · 352 阅读 · 0 评论