Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-07-18 12:12:12
阅读次数:
222
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-07-17 23:27:12
阅读次数:
216
Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni...
分类:
其他好文 时间:
2014-07-16 17:41:15
阅读次数:
173
function getImageSize(obj){
var _file=document.getElementById("file");
var i=_file.value.lastIndexOf('.');
var len=_file.value.length;
var extEndName=_file.value.substring(i+1,len);
var ex...
分类:
Web程序 时间:
2014-07-16 14:14:49
阅读次数:
224
substr() 方法可在字符串中抽取从 start 下标开始的指定数目的字符。语法stringObject.substr(start,length)参数描述start必需。要抽取的子串的起始下标。必须是数值。如果是负数,那么该参数声明从字符串的尾部开始算起的位置。也就是说,-1 指字符串中最后一个...
分类:
Web程序 时间:
2014-07-16 11:56:58
阅读次数:
257
HHyper Prefix SetsPrefix goodness of a set string is length of longest common prefix*number of strings in the set. For example the prefix goodness of ...
分类:
其他好文 时间:
2014-07-15 08:51:08
阅读次数:
261
1 public class Solution { 2 public String get(String a,String b) 3 { 4 5 if(a==""||b=="") return ""; 6 int len1=a.le...
分类:
其他好文 时间:
2014-07-13 22:05:47
阅读次数:
238
public class Solution { public int longestConsecutive(int[] num) { HashSet hash=new HashSet(); int max=1; for(int n:num) ...
分类:
其他好文 时间:
2014-07-13 21:52:58
阅读次数:
244
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
["aa","...
分类:
其他好文 时间:
2014-07-12 23:21:30
阅读次数:
215
题目来源,待字闺中,原创@陈利人
,欢迎大家继续关注微信公众账号“待字闺中”
原题这个LIS问题,可不是Longest Increasing Subsequence,而是Largest Independent Set,含义如下:给定一棵二叉树,找到满足如下条件的最大节点集合:集合中的任意两个节点之间,都没有边。如下图:
LIS大小为5,为{10,40,60,70,8...
分类:
其他好文 时间:
2014-07-12 23:20:18
阅读次数:
267