摘要: 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 any intervening characters.For example, given:S: "barfoothefoobarman"L: ["foo", &q 阅读全文
posted @ 2013-09-01 16:48 冰点猎手 阅读(161) 评论(0) 推荐(0)
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 unit 阅读全文
posted @ 2013-09-01 15:34 冰点猎手 阅读(181) 评论(0) 推荐(0)