摘要:
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 concatenati... 阅读全文
posted @ 2014-07-24 22:55
SunshineAtNoon
阅读(210)
评论(0)
推荐(0)
摘要:
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog... 阅读全文
posted @ 2014-07-24 19:52
SunshineAtNoon
阅读(412)
评论(0)
推荐(0)
摘要:
A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
posted @ 2014-07-24 16:44
SunshineAtNoon
阅读(182)
评论(0)
推荐(0)
摘要:
Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m... 阅读全文
posted @ 2014-07-24 16:08
SunshineAtNoon
阅读(230)
评论(0)
推荐(0)
摘要:
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2014-07-24 15:37
SunshineAtNoon
阅读(1415)
评论(0)
推荐(0)
摘要:
Divide two integers without using multiplication, division and mod operator.题解:要求不用乘除和取模运算实现两个数的除法。那么用加减法是很自然的选择。不过如果一次只从被除数中剪掉一个除数会TLE。所以我们借助移位运算,依次从... 阅读全文
posted @ 2014-07-24 14:59
SunshineAtNoon
阅读(516)
评论(0)
推荐(0)
摘要:
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文
posted @ 2014-07-24 11:57
SunshineAtNoon
阅读(281)
评论(0)
推荐(0)
摘要:
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文
posted @ 2014-07-24 10:47
SunshineAtNoon
阅读(204)
评论(0)
推荐(0)
摘要:
Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"Corner Cases:Did you con... 阅读全文
posted @ 2014-07-24 10:07
SunshineAtNoon
阅读(259)
评论(0)
推荐(0)

浙公网安备 33010602011771号