Substring with Concatenation of All Words。
分类:
其他好文 时间:
2015-02-05 23:18:23
阅读次数:
223
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 leaf node.
难度系数:
容易
实现
int maxDepth(Tr...
分类:
其他好文 时间:
2015-02-05 16:28:31
阅读次数:
119
字符串参数组合:方法:public static function substring(str:String, ...rest):String { if (!str) { return ""; } var len:uint = rest.length; var args:...
分类:
编程语言 时间:
2015-02-05 12:51:03
阅读次数:
167
在使用jstl的函数标签库之前需要在页面中引入:1、fn:contains(string, substring) 如果参数string中包含参数substring,返回true。2、fn:containsIgnoreCase(string, substring) 如果参数string中包含参数sub...
分类:
Web程序 时间:
2015-02-05 11:10:34
阅读次数:
174
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-02-05 00:41:45
阅读次数:
200
题目链接:Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid paren...
分类:
其他好文 时间:
2015-02-04 23:22:51
阅读次数:
189
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC"...
题意:
多组数据、
给你一颗树,
然后求一条最长异或路径,
异或路径长度定义为两点间简单路径上所有边权的异或和。
题解:
首先无根树转有根树再在树上跑一遍算出每个点到根的异或和。
然后两点间异或路径长度就是a[i]*a[j]。
因为lca之前那一段都被异或了两次搞没了。
然后求个线性基,然后随便搞搞就可以?可以WA了!
因为那么算哪是简单路径啊,或者说,那特喵的...
分类:
其他好文 时间:
2015-02-04 16:40:01
阅读次数:
228
如下所示: 1 public static void main(String[] args) 2 { 3 String url = "http://bbs.szshequ.org/user/login.html"; 4 System.out....
分类:
其他好文 时间:
2015-02-04 12:38:52
阅读次数:
121
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:
其他好文 时间:
2015-02-04 12:36:35
阅读次数:
104