上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页
摘要: 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 阅读(4164) 评论(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 阅读(164) 评论(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 阅读(191) 评论(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 阅读(164) 评论(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 阅读(191) 评论(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 阅读(149) 评论(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 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 题目描述:定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数。输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行为一个整数n(1 2 #include 3 #include 4 using namespace std; 5 6 int n, a... 阅读全文
posted @ 2014-04-18 15:37 Eason Liu 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页