摘要:
Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
posted @ 2014-04-29 16:27
Eason Liu
阅读(1000)评论(0)推荐(0)
编辑
摘要:
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation... 阅读全文
posted @ 2014-04-28 13:20
Eason Liu
阅读(4168)评论(1)推荐(1)
编辑
摘要:
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo... 阅读全文
posted @ 2014-04-27 19:02
Eason Liu
阅读(166)评论(0)推荐(0)
编辑
摘要:
Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e... 阅读全文
posted @ 2014-04-27 16:19
Eason Liu
阅读(194)评论(1)推荐(0)
编辑
摘要:
Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ... 阅读全文
posted @ 2014-04-27 15:13
Eason Liu
阅读(165)评论(0)推荐(0)
编辑
摘要:
Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl... 阅读全文
posted @ 2014-04-22 17:16
Eason Liu
阅读(3101)评论(0)推荐(0)
编辑
摘要:
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2014-04-22 16:34
Eason Liu
阅读(193)评论(0)推荐(0)
编辑
摘要:
The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie... 阅读全文
posted @ 2014-04-22 15:41
Eason Liu
阅读(150)评论(0)推荐(0)
编辑
摘要:
Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region... 阅读全文
posted @ 2014-04-22 15:28
Eason Liu
阅读(282)评论(0)推荐(0)
编辑